2200
How can I delete the selected items (including descendants)

// KeyDown event - Occurs when the user presses a key while an object has the focus.
void OnKeyDownG2antt1(short FAR*   KeyCode,short   Shift)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
		#import <ExG2antt.dll>
		using namespace EXG2ANTTLib;
	*/
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	spG2antt1->RemoveSelection();
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutSingleSel(VARIANT_FALSE);
spG2antt1->GetColumns()->Add(L"Tasks");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2017,8,1,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,128);
	var_Chart->PutSelBackColor(RGB(240,240,240));
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddBar(var_Items->AddItem("Task 1"),"Task",COleDateTime(2017,8,2,0,00,00).operator DATE(),COleDateTime(2017,8,6,0,00,00).operator DATE(),vtMissing,vtMissing);
	long h = var_Items->AddItem("Task 2");
	var_Items->AddBar(h,"Task",COleDateTime(2017,8,3,0,00,00).operator DATE(),COleDateTime(2017,8,9,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutSelectItem(h,VARIANT_TRUE);
	h = var_Items->AddItem("Task 3");
	var_Items->AddBar(h,"Task",COleDateTime(2017,8,4,0,00,00).operator DATE(),COleDateTime(2017,8,13,0,00,00).operator DATE(),"",vtMissing);
	var_Items->PutSelectItem(h,VARIANT_TRUE);
	var_Items->AddBar(var_Items->AddItem("Task 4"),"Task",COleDateTime(2017,8,5,0,00,00).operator DATE(),COleDateTime(2017,8,16,0,00,00).operator DATE(),vtMissing,vtMissing);
spG2antt1->EndUpdate();

2199
Dark mode

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
_bstr_t back = 65536;
_bstr_t fore = 16777215;
spG2antt1->GetVisualAppearance()->Add(1,_bstr_t("gBFLBCJwBAEHhEJAAEhABXUIQAAYAQGKIcBiAKBQAGYBIJDEMgzDDAUBjKKocQTC4AIQjCK4JDKHYJRpHEZyCA8EhqGASRAFUQBYiWE4oSpLABQaK0ZwIGyRIrkGQgQ") +
"gmPYDSDNU4zVIEEglBI0TDNczhNDENgtGYaJqHIYpZBcM40TKkEZoSIITZcRrOEBiRL1S0RBhGcRUHZlWzdN64LhuK47UrWdD/XhdVzXRbjfz1Oq+bxve48Br7A5yYTh" +
"dr4LhOFQ3RjIL4xbIcUwGe6VZhjOLZXjmO49T69HTtOCYBEBA");
spG2antt1->GetVisualAppearance()->Add(2,_bstr_t("gBFLBCJwBAEHhEJAAEhABPMIQAAYAQGKIcBiAKBQAGaAoDDcMgwQwAAxjIKUEwsACEIrjKCYVgOHYYQjGMZwHCMIhiGwcAChEZYHgkMYmDAMUhSE78axHG6PY7kKZ4b") +
"iaKIqQLLEhSfJ0YyBECBZpfebIbjmIZMSLEIxDKItJSpCIaRgqWS6ahGO4JUbUFLQHT9IR4daIYRgEEBA");
spG2antt1->GetVisualAppearance()->Add(3,_bstr_t("gBFLBCJwBAEHhEJAAEhABUUIQAAYAQGKIcBiAKBQAGaAoDDcMgwQwAAxjIKUEwsACEIrjKCYVgOHYYQjGMZwGAsEwjAoYAChEaILgkMw2DBIQwgJIMEr/G6RZxjeL5C") +
"jmG4nDhKMpybAcXxjBIYZJgOQpXb+PobTrNNLzfRFAxVAaWJikcZ4HpIAJNVLFdQ0XYMNSBISsBqrKiKcpeIIDWBZMbRZT1ZABCIZBpEW6LahENQwXrCN74DYkNTdKax" +
"bbuaaXLhGCYBgIA==");
spG2antt1->PutHeaderAppearance(EXG2ANTTLib::Bump);
spG2antt1->PutBackColor(back);
spG2antt1->PutBackColorHeader(back);
spG2antt1->PutBackColorLevelHeader(back);
spG2antt1->PutBackColorSortBar(back);
spG2antt1->PutBackColorSortBarCaption(back);
spG2antt1->PutFilterBarBackColor(back);
spG2antt1->PutFilterBarForeColor(fore);
spG2antt1->PutForeColor(fore);
spG2antt1->PutForeColorHeader(fore);
spG2antt1->PutForeColorSortBar(fore);
spG2antt1->PutSelBackColor(fore);
spG2antt1->PutSelForeColor(back);
spG2antt1->PutBackground(EXG2ANTTLib::exHeaderFilterBarButton,0x1000000);
spG2antt1->PutBackground(EXG2ANTTLib::exSplitBar,0x2000000);
spG2antt1->PutBackground(EXG2ANTTLib::exCursorHoverColumn,-1);
spG2antt1->PutBackground(EXG2ANTTLib::exToolTipAppearance,0x3000000);
spG2antt1->PutBackground(EXG2ANTTLib::exToolTipBackColor,back);
spG2antt1->PutBackground(EXG2ANTTLib::exToolTipForeColor,fore);
spG2antt1->PutBackground(EXG2ANTTLib::exSelBackColorFilter,fore);
spG2antt1->PutBackground(EXG2ANTTLib::exSelForeColorFilter,back);
spG2antt1->PutBackground(EXG2ANTTLib::exBackColorFilter,back);
spG2antt1->PutBackground(EXG2ANTTLib::exForeColorFilter,fore);
spG2antt1->PutBackground(EXG2ANTTLib::exSortBarLinkColor,back);
spG2antt1->PutBackground(EXG2ANTTLib::exCSplitBar,0x2000000);
spG2antt1->PutBackground(EXG2ANTTLib::exHSplitBar,0x2000000);
spG2antt1->PutBackground(EXG2ANTTLib::exTreeLinesColor,fore);
spG2antt1->PutBackground(EXG2ANTTLib::exScrollSizeGrip,back);
spG2antt1->PutDescription(EXG2ANTTLib::exFilterBarExclude,L"<bgcolor 0><fgcolor ffffff> Exclude </fgcolor></bgcolor>");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutBackColor(back);
	var_Chart->PutBackColorLevelHeader(back);
	var_Chart->PutForeColor(fore);
	var_Chart->PutForeColorLevelHeader(fore);
spG2antt1->EndUpdate();

2198
I have changed the font, but the item's height remains the same. What I am doing wrong

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutColumnAutoResize(VARIANT_FALSE);
spG2antt1->LoadXML("http://www.exontrol.net/testing.xml");
spG2antt1->GetFont()->PutSize(_variant_t(long(22)));
spG2antt1->PutHeaderHeight(42);
spG2antt1->PutDefaultItemHeight(36);
spG2antt1->GetItems()->PutItemHeight(0,spG2antt1->GetDefaultItemHeight());
spG2antt1->GetChart()->PutUnitWidth(spG2antt1->GetDefaultItemHeight());
spG2antt1->GetChart()->PutUnitScale(spG2antt1->GetChart()->GetUnitScale());
spG2antt1->GetChart()->GetBars()->GetItem("Task")->PutHeight(18);
spG2antt1->EndUpdate();

2197
I have changed from Project Summary Task to own task created with EBN to get a black frame then using different colors for project status. How can I enlarge the EBN being applied to the head-arrows shows the start/end margins of the range

// AddGroupItem event - Occurs after a new Group Item has been inserted to Items collection.
void OnAddGroupItemG2antt1(long   Item)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
		#import <ExG2antt.dll>
		using namespace EXG2ANTTLib;
	*/
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
		var_Items->PutItemBold(Item,VARIANT_TRUE);
		var_Items->AddBar(Item,var_Items->GetCellValue(Item,var_Items->GetGroupItem(Item)),COleDateTime(2017,12,2,0,00,00).operator DATE(),COleDateTime(2017,12,2,0,00,00).operator DATE(),vtMissing,vtMissing);
		var_Items->DefineSummaryBars(Item,"",-3,"");
}

// AddItem event - Occurs after a new Item has been inserted to Items collection.
void OnAddItemG2antt1(long   Item)
{
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	spG2antt1->GetItems()->AddBar(Item,"Task",COleDateTime(2017,12,4,0,00,00).operator DATE(),COleDateTime(2017,12,10,0,00,00).operator DATE(),vtMissing,vtMissing);
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
EXG2ANTTLib::IAppearancePtr var_Appearance = spG2antt1->GetVisualAppearance();
	var_Appearance->Add(1,_bstr_t("gBFLBCJwBAEHhEJAAEhABN0GACAADACAxRDgMQBQKAAzQFAYbBuGCGAAGIYBTgmFgAQhFcZQSKUOQTDKNYykCQBQAWCQ1DAJIqjOAkEhiGCUQClYYZBjWG4dQLOEYTN") +
"C8WwHCIZBpEWgKChGKAlSANMjTZLkdR1ECmIhoSg4coKMoERBJco1BDdOQGAyEQShEC4fgmVwAP7aNoWVC1JynM6XaKmGbJAA6CZgQKGFh2LAdTzSf61cAtWpaUjmRZa" +
"YSAFDxpiCYpfQjdUB2JDVfTVP6LbawS4KZgOR5eRboETYeAFcSZGrNMKEXLLSyudKRRreWQaPpGCZTRSUdZxSrbBhvEqlbRNMhwSBEEigNIxToOU4jFgeCROQwQRK9BB" +
"oG0CQUEIdhAAyJJvjUeZdmmb5+C8HhiAeZJznoPQ+EgT4rlua4BjCfg+k8d5TkUCZ4w+fxfB+X5xn4fheGebZoH8X53koAR9CASAWAUfofjgJgKH+IJHnGcIDmER5iBE" +
"eZgmgVgLgGYYYGoFRTCGaIGAYRYiCiFgmgmYQEF4KIKmKSBRBqCxjAiRgvgwYxIiGQYNmOCJlDUOpeAQBCAg=");
	var_Appearance->Add(2,"CP:1 -6 0 6 0");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutLevelCount(2);
	var_Chart->PutFirstVisibleDate(COleDateTime(2017,12,2,0,00,00).operator DATE());
	var_Chart->PutPaneWidth(VARIANT_FALSE,342);
	var_Chart->GetBars()->Add(L"S1")->PutColor(0x1000000);
	var_Chart->GetBars()->Add(L"S2")->PutColor(0x2ff0000);
EXG2ANTTLib::IColumnsPtr var_Columns = spG2antt1->GetColumns();
	var_Columns->Add(L"C1");
	((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"C2")))->PutAllowSort(VARIANT_FALSE);
spG2antt1->PutSingleSort(VARIANT_FALSE);
spG2antt1->PutAllowGroupBy(VARIANT_TRUE);
spG2antt1->PutHeaderVisible(EXG2ANTTLib::exHeaderVisibleExtendLevels);
spG2antt1->PutHeaderAppearance(EXG2ANTTLib::Flat);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->PutCellValue(var_Items->AddItem("S1"),long(1),"SubItem A.1");
	var_Items->PutCellValue(var_Items->AddItem("S1"),long(1),"SubItem A.1");
	var_Items->PutCellValue(var_Items->AddItem("S2"),long(1),"SubItem B.1");
	var_Items->PutCellValue(var_Items->AddItem("S2"),long(1),"SubItem B.1");
spG2antt1->PutLayout(L"MultipleSort = \"C0:2\"");
spG2antt1->EndUpdate();

2196
How can I specify the cell's outline, border or lines around, when the cell gets selected

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->AttachTemplate("handle AddColumn(Column){Column{Def(48)=4;Def(49)=4;}}");
EXG2ANTTLib::IAppearancePtr var_Appearance = spG2antt1->GetVisualAppearance();
	var_Appearance->Add(1,_bstr_t("gBFLBCJwBAEHhEJAAEhABPEGACAADACAxRDgMQBQKAAzQFAYbBuGCGAAGIYBTgmFgAQhFcZQSpEEg7BKMYwjOJgFgmEQxDANIBQSKoaQiGQYYLhEZAEiONoaDJCM4wH") +
"IMQxHCKTZRkGcfaRCGSfIzpGKpVgOTYiTbPcIyQKtBxDIydJTmeQQQhsFIJU7SdVUPDUJZlWbLAwWTAYazXCKRZBpeJqdo6Y5RUDKUqSdLUYyvEq7ZqnOIpw5vICpaCq" +
"Op6HqKFpiXSAFL1fLmAwvPKrJjoeqpWpyCaRZQAGg4dbEdTNNCIbatQANKrCSpgZ7sMB6Di2L4TPS2awoWgRYyTFZMbBAeQ7LC1c45Fqrd4zS4dSxKCahcLxFiaNpYZY" +
"njUap1jGPJlkuAgAkidB3nceZsCQEQJCgGhMGcQ4pkiSxEAAOYpiQIhvkYNA2gSCg5n+LIoGILowFyXQoAYAoAmASAWAaAZgggJgKF2T54DYDoDmECBGBKBJgGgTgWgW" +
"YRoFYGIGmGOBqByB5hCgegggiYJYgoJIICIaIeByChixULILGGGAWDCCgjCiTgrg0YxojoC4OmOSJ2D6D5kAgJLFgABAEICA=");
	var_Appearance->Add(2,"CP:1 -4 0 0 0");
spG2antt1->PutSelBackColor(0x2000000);
spG2antt1->PutSelForeColor(RGB(0,0,1));
spG2antt1->PutFullRowSelect(EXG2ANTTLib::exColumnSel);
spG2antt1->PutShowFocusRect(VARIANT_FALSE);
spG2antt1->PutDefaultItemHeight(24);
spG2antt1->PutHeaderHeight(24);
spG2antt1->PutDrawGridLines(EXG2ANTTLib::exVLines);
spG2antt1->GetColumns()->Add(L"C1");
spG2antt1->GetColumns()->Add(L"C2");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->PutCellValue(var_Items->AddItem("Cell 1"),long(1),"Cell 2");
	var_Items->PutCellValue(var_Items->AddItem("Cell 3"),long(1),"Cell 4");
spG2antt1->GetItems()->PutSelectPos(long(1));
spG2antt1->PutSelectColumnIndex(1);
spG2antt1->EndUpdate();

2195
How can I specify the cell's outline, border or lines around, when the item gets selected

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->AttachTemplate("handle AddColumn(Column){Column{Def(48)=4;Def(49)=4;}}");
spG2antt1->GetVisualAppearance()->Add(1,_bstr_t("gBFLBCJwBAEHhEJAAEhABPEGACAADACAxRDgMQBQKAAzQFAYbBuGCGAAGIYBTgmFgAQhFcZQSpEEg7BKMYwjOJgFgmEQxDANIBQSKoaQiGQYYLhEZAEiONoaDJCM4wH") +
"IMQxHCKTZRkGcfaRCGSfIzpGKpVgOTYiTbPcIyQKtBxDIydJTmeQQQhsFIJU7SdVUPDUJZlWbLAwWTAYazXCKRZBpeJqdo6Y5RUDKUqSdLUYyvEq7ZqnOIpw5vICpaCq" +
"Op6HqKFpiXSAFL1fLmAwvPKrJjoeqpWpyCaRZQAGg4dbEdTNNCIbatQANKrCSpgZ7sMB6Di2L4TPS2awoWgRYyTFZMbBAeQ7LC1c45Fqrd4zS4dSxKCahcLxFiaNpYZY" +
"njUap1jGPJlkuAgAkidB3nceZsCQEQJCgGhMGcQ4pkiSxEAAOYpiQIhvkYNA2gSCg5n+LIoGILowFyXQoAYAoAmASAWAaAZgggJgKF2T54DYDoDmECBGBKBJgGgTgWgW" +
"YRoFYGIGmGOBqByB5hCgegggiYJYgoJIICIaIeByChixULILGGGAWDCCgjCiTgrg0YxojoC4OmOSJ2D6D5kAgJLFgABAEICA=");
spG2antt1->PutSelBackColor(0x1000000);
spG2antt1->PutSelForeColor(RGB(0,0,1));
spG2antt1->PutShowFocusRect(VARIANT_FALSE);
spG2antt1->PutDefaultItemHeight(24);
spG2antt1->PutHeaderHeight(24);
spG2antt1->PutDrawGridLines(EXG2ANTTLib::exVLines);
spG2antt1->GetColumns()->Add(L"C1");
spG2antt1->GetColumns()->Add(L"C2");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->PutCellValue(var_Items->AddItem("Cell 1"),long(1),"Cell 2");
	var_Items->PutCellValue(var_Items->AddItem("Cell 3"),long(1),"Cell 4");
	var_Items->PutSelectPos(long(1));
spG2antt1->EndUpdate();

2194
How can I specify the cell's outline, border or lines around

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->AttachTemplate("handle AddColumn(Column){Column{Def(48)=4;Def(49)=4;}}");
spG2antt1->GetVisualAppearance()->Add(1,_bstr_t("gBFLBCJwBAEHhEJAAEhABPEGACAADACAxRDgMQBQKAAzQFAYbBuGCGAAGIYBTgmFgAQhFcZQSpEEg7BKMYwjOJgFgmEQxDANIBQSKoaQiGQYYLhEZAEiONoaDJCM4wH") +
"IMQxHCKTZRkGcfaRCGSfIzpGKpVgOTYiTbPcIyQKtBxDIydJTmeQQQhsFIJU7SdVUPDUJZlWbLAwWTAYazXCKRZBpeJqdo6Y5RUDKUqSdLUYyvEq7ZqnOIpw5vICpaCq" +
"Op6HqKFpiXSAFL1fLmAwvPKrJjoeqpWpyCaRZQAGg4dbEdTNNCIbatQANKrCSpgZ7sMB6Di2L4TPS2awoWgRYyTFZMbBAeQ7LC1c45Fqrd4zS4dSxKCahcLxFiaNpYZY" +
"njUap1jGPJlkuAgAkidB3nceZsCQEQJCgGhMGcQ4pkiSxEAAOYpiQIhvkYNA2gSCg5n+LIoGILowFyXQoAYAoAmASAWAaAZgggJgKF2T54DYDoDmECBGBKBJgGgTgWgW" +
"YRoFYGIGmGOBqByB5hCgegggiYJYgoJIICIaIeByChixULILGGGAWDCCgjCiTgrg0YxojoC4OmOSJ2D6D5kAgJLFgABAEICA=");
spG2antt1->PutSelBackMode(EXG2ANTTLib::exTransparent);
spG2antt1->PutShowFocusRect(VARIANT_FALSE);
spG2antt1->PutDefaultItemHeight(24);
spG2antt1->PutHeaderHeight(24);
spG2antt1->PutDrawGridLines(EXG2ANTTLib::exVLines);
spG2antt1->GetColumns()->Add(L"C1");
spG2antt1->GetColumns()->Add(L"C2");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->PutCellValue(var_Items->AddItem("Cell 1"),long(1),"Cell 2");
	long h = var_Items->AddItem("Cell 2");
	var_Items->PutCellValue(h,long(1),"Cell 3");
	var_Items->PutCellBackColor(h,long(1),0x1000000);
spG2antt1->EndUpdate();

2193
Is it possible to highligth the match while a filter is applied

// AddColumn event - Fired after a new column has been added.
void OnAddColumnG2antt1(LPDISPATCH   Column)
{
	// Column.Def(17) = 1
}

// FilterChange event - Occurs when the filter was changed.
void OnFilterChangeG2antt1()
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
		#import <ExG2antt.dll>
		using namespace EXG2ANTTLib;
	*/
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	_variant_t format = spG2antt1->FormatABC(L"`value replace '` + value + `' with '<bgcolor 000000><fgcolor FFFFFF>` + value  + `</fgcolor></bgcolor>'`",spG2antt1->GetFilterBarPromptPattern(),vtMissing,vtMissing);
	spG2antt1->GetColumns()->GetItem(long(0))->PutFormatColumn(L"format");
	spG2antt1->GetColumns()->GetItem(long(1))->PutFormatColumn(L"format");
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutDrawGridLines(EXG2ANTTLib::exVLines);
spG2antt1->PutHeaderAppearance(EXG2ANTTLib::Etched);
spG2antt1->GetColumns()->Add(L"Col 1");
spG2antt1->GetColumns()->Add(L"Col 2");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->PutCellValue(var_Items->AddItem("219 Smith"),long(1),"Ignacio 1234");
	var_Items->PutCellValue(var_Items->AddItem("1666 County Road 309A"),long(1),"897 Manassa");
	var_Items->PutCellValue(var_Items->AddItem("38 Lone Pine"),long(1),"Durango 11");
	var_Items->PutCellValue(var_Items->AddItem("612 Jachim Street"),long(1),"Lamar 222");
spG2antt1->PutFilterBarPromptPattern(L"1");
spG2antt1->PutFilterBarPromptVisible(EXG2ANTTLib::FilterBarVisibleEnum(EXG2ANTTLib::exFilterBarCompact | EXG2ANTTLib::exFilterBarSingleLine | EXG2ANTTLib::exFilterBarVisible | EXG2ANTTLib::exFilterBarPromptVisible));
spG2antt1->PutFilterBarPromptType(EXG2ANTTLib::FilterPromptEnum(EXG2ANTTLib::exFilterPromptCaseSensitive | EXG2ANTTLib::exFilterPromptContainsAll));
spG2antt1->EndUpdate();

2192
How can I display the total/sum/aggregate in the same column, when the user groups by a column

// AddColumn event - Fired after a new column has been added.
void OnAddColumnG2antt1(LPDISPATCH   Column)
{
}

// AddGroupItem event - Occurs after a new Group Item has been inserted to Items collection.
void OnAddGroupItemG2antt1(long   Item)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
		#import <ExG2antt.dll>
		using namespace EXG2ANTTLib;
	*/
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
		var_Items->PutItemDivider(Item,-1);
		var_Items->PutItemBackColor(Item,spG2antt1->GetBackColorSortBar());
		var_Items->PutItemHeight(Item,spG2antt1->GetHeaderHeight());
		var_Items->PutCellMerge(Item,long(0),"1,2,3,4,5,7,8,9,10,11,12");
		var_Items->PutCellValue(Item,long(13),"count(current,rec,1)");
		var_Items->PutCellValueFormat(Item,long(13),EXG2ANTTLib::ValueFormatEnum(EXG2ANTTLib::exTotalField | EXG2ANTTLib::exHTML));
		var_Items->PutCellValue(Item,long(0),var_Items->GetCellCaption(Item,var_Items->GetGroupItem(Item)));
		var_Items->PutFormatCell(Item,long(0),L"`<b>` + value + `</b> <font ;7><off 3><fgcolor=808080>(` + %13 +  `)`");
		var_Items->PutCellValue(Item,long(6),"sum(current,all,dbl(%6))");
		var_Items->PutCellValueFormat(Item,long(6),EXG2ANTTLib::ValueFormatEnum(EXG2ANTTLib::exTotalField | EXG2ANTTLib::exHTML));
		var_Items->PutCellForeColor(Item,long(6),RGB(102,102,102));
}

// Change event - Occurs when the user changes the cell's content.
void OnChangeG2antt1(long   Item,long   ColIndex,VARIANT FAR*   NewValue)
{
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	spG2antt1->Refresh();
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutLinesAtRoot(EXG2ANTTLib::exGroupLinesOutside);
spG2antt1->PutIndent(12);
spG2antt1->PutColumnAutoResize(VARIANT_FALSE);
spG2antt1->PutScrollBySingleLine(VARIANT_TRUE);
spG2antt1->PutBackColorSortBar(RGB(240,240,240));
spG2antt1->PutAutoDrag(EXG2ANTTLib::exAutoDragScroll);
/*
	Includes the definition for CreateObject function like follows:

	#include <comdef.h>
	IUnknownPtr CreateObject( BSTR Object )
	{
		IUnknownPtr spResult;
		spResult.CreateInstance( Object );
		return spResult;
	};

*/
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'ADODB' for the library: 'Microsoft ActiveX Data Objects 6.1 Library'

	#import <msado15.dll> rename("EOF","REOF")
*/
ADODB::_RecordsetPtr rs = ::CreateObject(L"ADOR.Recordset");
	rs->Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExG2antt\\Sample\\Access\\misc.accdb",ADODB::adOpenStatic,ADODB::adLockOptimistic,0);
spG2antt1->PutDataSource(((ADODB::_RecordsetPtr)(rs)));
spG2antt1->PutSingleSort(VARIANT_FALSE);
spG2antt1->PutSortBarVisible(VARIANT_TRUE);
spG2antt1->PutAllowGroupBy(VARIANT_TRUE);
spG2antt1->PutHeaderHeight(24);
EXG2ANTTLib::IColumnsPtr var_Columns = spG2antt1->GetColumns();
	((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Count")))->PutVisible(VARIANT_FALSE);
	EXG2ANTTLib::IColumnPtr var_Column = var_Columns->GetItem("Freight");
		var_Column->PutDef(EXG2ANTTLib::exCellBackColor,spG2antt1->GetBackColorSortBar());
		var_Column->PutDef(EXG2ANTTLib::exHeaderBackColor,var_Column->GetDef(EXG2ANTTLib::exCellBackColor));
		var_Column->PutDef(EXG2ANTTLib::exCellPaddingRight,long(4));
		var_Column->PutDef(EXG2ANTTLib::exCellPaddingLeft,long(4));
		var_Column->PutHeaderBold(VARIANT_TRUE);
		var_Column->PutAllowGroupBy(VARIANT_FALSE);
		var_Column->PutFormatColumn(L"value format ``");
		var_Column->PutAlignment(EXG2ANTTLib::RightAlignment);
	EXG2ANTTLib::IColumnPtr var_Column1 = var_Columns->GetItem(long(0));
		var_Column1->PutAllowGroupBy(VARIANT_FALSE);
		var_Column1->PutDef(EXG2ANTTLib::exCellValueFormat,long(1));
	var_Columns->GetItem("ShipCountry")->PutSortOrder(EXG2ANTTLib::SortAscending);
spG2antt1->PutScrollBySingleLine(VARIANT_FALSE);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->PutLockedItemCount(EXG2ANTTLib::exBottom,1);
	long hL = var_Items->GetLockedItem(EXG2ANTTLib::exBottom,0);
	var_Items->PutItemHeight(hL,24);
	var_Items->PutItemBold(hL,VARIANT_TRUE);
	var_Items->PutItemBackColor(hL,spG2antt1->GetBackColorSortBar());
	var_Items->PutCellValue(hL,long(6),"sum(all,rec,dbl(%6))");
	var_Items->PutCellValueFormat(hL,long(6),EXG2ANTTLib::ValueFormatEnum(EXG2ANTTLib::exTotalField | EXG2ANTTLib::exHTML));
	var_Items->PutCellHAlignment(hL,long(6),EXG2ANTTLib::RightAlignment);
	var_Items->PutFormatCell(hL,long(6),L"value format ``");
spG2antt1->EndUpdate();

2191
How do I add a total field locked at the bottom of the control

// AddGroupItem event - Occurs after a new Group Item has been inserted to Items collection.
void OnAddGroupItemG2antt1(long   Item)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
		#import <ExG2antt.dll>
		using namespace EXG2ANTTLib;
	*/
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
		var_Items->PutItemDividerLine(Item,EXG2ANTTLib::EmptyLine);
		var_Items->PutFormatCell(Item,var_Items->GetGroupItem(Item),L"value + ` Min: <b>` + %13 + `</b> Max: <b>` + %14 + `</b> Sum: <b>` + %15 + `</b>, of Freight column`");
		var_Items->PutCellValue(Item,"Min","min(current,all,dbl(%6))");
		var_Items->PutCellValueFormat(Item,"Min",EXG2ANTTLib::exTotalField);
		var_Items->PutCellValue(Item,"Max","max(current,all,dbl(%6))");
		var_Items->PutCellValueFormat(Item,"Max",EXG2ANTTLib::exTotalField);
		var_Items->PutCellValue(Item,"Sum","sum(current,all,dbl(%6))");
		var_Items->PutCellValueFormat(Item,"Sum",EXG2ANTTLib::exTotalField);
		var_Items->PutItemBackColor(Item,RGB(240,240,240));
}

// Change event - Occurs when the user changes the cell's content.
void OnChangeG2antt1(long   Item,long   ColIndex,VARIANT FAR*   NewValue)
{
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	spG2antt1->Refresh();
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutHasLines(EXG2ANTTLib::exNoLine);
spG2antt1->PutDescription(EXG2ANTTLib::exColumnsFloatBar,L"Show/Hide");
spG2antt1->PutColumnsFloatBarSortOrder(EXG2ANTTLib::SortAscending);
spG2antt1->PutColumnsFloatBarVisible(EXG2ANTTLib::exColumnsFloatBarVisibleIncludeCheckColumns);
spG2antt1->PutColumnAutoResize(VARIANT_FALSE);
spG2antt1->PutBackColorSortBar(RGB(240,240,240));
/*
	Includes the definition for CreateObject function like follows:

	#include <comdef.h>
	IUnknownPtr CreateObject( BSTR Object )
	{
		IUnknownPtr spResult;
		spResult.CreateInstance( Object );
		return spResult;
	};

*/
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'ADODB' for the library: 'Microsoft ActiveX Data Objects 6.1 Library'

	#import <msado15.dll> rename("EOF","REOF")
*/
ADODB::_RecordsetPtr rs = ::CreateObject(L"ADOR.Recordset");
	rs->Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExG2antt\\Sample\\Access\\misc.accdb",ADODB::adOpenStatic,ADODB::adLockOptimistic,0);
spG2antt1->PutDataSource(((ADODB::_RecordsetPtr)(rs)));
spG2antt1->PutSingleSort(VARIANT_FALSE);
spG2antt1->PutSortBarVisible(VARIANT_TRUE);
spG2antt1->PutAllowGroupBy(VARIANT_TRUE);
spG2antt1->PutSortBarCaption(L"Drag a <b>column</b> header here to group by that column.");
EXG2ANTTLib::IColumnsPtr var_Columns = spG2antt1->GetColumns();
	EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Min")));
		var_Column->PutVisible(VARIANT_FALSE);
		var_Column->PutAllowDragging(VARIANT_FALSE);
	var_Column = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Max")));
		var_Column->PutVisible(VARIANT_FALSE);
		var_Column->PutVisible(VARIANT_FALSE);
		var_Column->PutAllowDragging(VARIANT_FALSE);
	EXG2ANTTLib::IColumnPtr var_Column1 = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Sum")));
		var_Column1->PutVisible(VARIANT_FALSE);
		var_Column1->PutVisible(VARIANT_FALSE);
		var_Column1->PutAllowDragging(VARIANT_FALSE);
EXG2ANTTLib::IColumnPtr var_Column2 = spG2antt1->GetColumns()->GetItem("Freight");
	var_Column2->PutFormatColumn(L"currency(value)");
	var_Column2->PutDef(EXG2ANTTLib::exCellBackColor,long(12895487));
	var_Column2->PutDef(EXG2ANTTLib::exHeaderBackColor,var_Column2->GetDef(EXG2ANTTLib::exCellBackColor));
	var_Column2->PutHeaderBold(VARIANT_TRUE);
	var_Column2->PutAllowGroupBy(VARIANT_FALSE);
	var_Column2->PutAlignment(EXG2ANTTLib::RightAlignment);
spG2antt1->PutScrollBySingleLine(VARIANT_FALSE);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->PutLockedItemCount(EXG2ANTTLib::exBottom,2);
	long hL = var_Items->GetLockedItem(EXG2ANTTLib::exBottom,0);
	var_Items->PutItemDivider(hL,0);
	var_Items->PutItemHeight(hL,3);
	var_Items->PutItemDividerLineAlignment(hL,EXG2ANTTLib::DividerTop);
	var_Items->PutItemDividerLine(hL,EXG2ANTTLib::DoubleLine);
	hL = var_Items->GetLockedItem(EXG2ANTTLib::exBottom,1);
	var_Items->PutCellValue(hL,long(6),"sum(all,rec,dbl(%6))");
	var_Items->PutCellValueFormat(hL,long(6),EXG2ANTTLib::exTotalField);
	var_Items->PutItemHeight(hL,24);
	var_Items->PutItemBold(hL,VARIANT_TRUE);
spG2antt1->GetColumns()->GetItem("EmployeeID")->PutSortOrder(VARIANT_TRUE);
spG2antt1->EndUpdate();

2190
How can I add a total field, when I use grouping

// AddGroupItem event - Occurs after a new Group Item has been inserted to Items collection.
void OnAddGroupItemG2antt1(long   Item)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
		#import <ExG2antt.dll>
		using namespace EXG2ANTTLib;
	*/
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
		var_Items->PutItemDividerLine(Item,EXG2ANTTLib::EmptyLine);
		var_Items->PutFormatCell(Item,var_Items->GetGroupItem(Item),L"value + ` Min: <b>` + %13 + `</b> Max: <b>` + %14 + `</b> Sum: <b>` + %15 + `</b>, of Freight column`");
		var_Items->PutCellValue(Item,"Min","min(current,all,dbl(%6))");
		var_Items->PutCellValueFormat(Item,"Min",EXG2ANTTLib::exTotalField);
		var_Items->PutCellValue(Item,"Max","max(current,all,dbl(%6))");
		var_Items->PutCellValueFormat(Item,"Max",EXG2ANTTLib::exTotalField);
		var_Items->PutCellValue(Item,"Sum","sum(current,all,dbl(%6))");
		var_Items->PutCellValueFormat(Item,"Sum",EXG2ANTTLib::exTotalField);
		var_Items->PutItemBackColor(Item,RGB(240,240,240));
}

// Change event - Occurs when the user changes the cell's content.
void OnChangeG2antt1(long   Item,long   ColIndex,VARIANT FAR*   NewValue)
{
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	spG2antt1->Refresh();
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutHasLines(EXG2ANTTLib::exNoLine);
spG2antt1->PutColumnAutoResize(VARIANT_FALSE);
spG2antt1->PutBackColorSortBar(RGB(240,240,240));
/*
	Includes the definition for CreateObject function like follows:

	#include <comdef.h>
	IUnknownPtr CreateObject( BSTR Object )
	{
		IUnknownPtr spResult;
		spResult.CreateInstance( Object );
		return spResult;
	};

*/
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'ADODB' for the library: 'Microsoft ActiveX Data Objects 6.1 Library'

	#import <msado15.dll> rename("EOF","REOF")
*/
ADODB::_RecordsetPtr rs = ::CreateObject(L"ADOR.Recordset");
	rs->Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExG2antt\\Sample\\Access\\misc.accdb",ADODB::adOpenStatic,ADODB::adLockOptimistic,0);
spG2antt1->PutDataSource(((ADODB::_RecordsetPtr)(rs)));
spG2antt1->PutSingleSort(VARIANT_FALSE);
spG2antt1->PutSortBarVisible(VARIANT_TRUE);
spG2antt1->PutAllowGroupBy(VARIANT_TRUE);
spG2antt1->GetColumns()->GetItem(long(1))->PutSortOrder(VARIANT_TRUE);
EXG2ANTTLib::IColumnsPtr var_Columns = spG2antt1->GetColumns();
	((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Min")))->PutVisible(VARIANT_FALSE);
	((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Max")))->PutVisible(VARIANT_FALSE);
	((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Sum")))->PutVisible(VARIANT_FALSE);
EXG2ANTTLib::IColumnPtr var_Column = spG2antt1->GetColumns()->GetItem("Freight");
	var_Column->PutDef(EXG2ANTTLib::exCellBackColor,long(12895487));
	var_Column->PutDef(EXG2ANTTLib::exHeaderBackColor,var_Column->GetDef(EXG2ANTTLib::exCellBackColor));
	var_Column->PutHeaderBold(VARIANT_TRUE);
	var_Column->PutAllowGroupBy(VARIANT_FALSE);
spG2antt1->PutScrollBySingleLine(VARIANT_FALSE);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->PutLockedItemCount(EXG2ANTTLib::exBottom,1);
	long hL = var_Items->GetLockedItem(EXG2ANTTLib::exBottom,0);
	var_Items->PutItemDivider(hL,0);
	var_Items->PutItemHeight(hL,24);
	var_Items->PutItemDividerLineAlignment(hL,EXG2ANTTLib::DividerTop);
	var_Items->PutItemDividerLine(hL,EXG2ANTTLib::DoubleLine);
	var_Items->PutCellValue(hL,long(0),"sum(all,rec,dbl(%6))");
	var_Items->PutCellValueFormat(hL,long(0),EXG2ANTTLib::ValueFormatEnum(EXG2ANTTLib::exTotalField | EXG2ANTTLib::exHTML));
	var_Items->PutCellHAlignment(hL,long(0),EXG2ANTTLib::RightAlignment);
	var_Items->PutFormatCell(hL,long(0),L"'Freight: <bgcolor=FFC4C4> '+(value format ``) + ` `");
spG2antt1->EndUpdate();

2189
How do I use the ColumnsFloatBarVisible on exColumnsFloatBarVisibleIncludeCheckColumns

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutColumnAutoResize(VARIANT_FALSE);
spG2antt1->PutHeaderAppearance(EXG2ANTTLib::Etched);
EXG2ANTTLib::IColumnsPtr var_Columns = spG2antt1->GetColumns();
	var_Columns->Add(L"City");
	((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Start")))->PutVisible(VARIANT_FALSE);
	((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"End")))->PutVisible(VARIANT_FALSE);
spG2antt1->PutDescription(EXG2ANTTLib::exColumnsFloatBar,L"Show/Hide");
spG2antt1->PutColumnsFloatBarSortOrder(EXG2ANTTLib::SortAscending);
spG2antt1->PutColumnsFloatBarVisible(EXG2ANTTLib::exColumnsFloatBarVisibleIncludeCheckColumns);
spG2antt1->EndUpdate();

2188
The BackColorAlternate displays each second row with a different background color. The question I have it is possible to apply a different background color for 3rd, 4th, row, and so on

// LayoutChanged event - Occurs when column's position or column's size is changed.
void OnLayoutChangedG2antt1()
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
		#import <ExG2antt.dll>
		using namespace EXG2ANTTLib;
	*/
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	spG2antt1->Refresh();
}

// Sort event - Fired when the control sorts a column.
void OnSortG2antt1()
{
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	spG2antt1->Refresh();
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutHasLines(EXG2ANTTLib::exNoLine);
spG2antt1->PutColumnAutoResize(VARIANT_FALSE);
/*
	Includes the definition for CreateObject function like follows:

	#include <comdef.h>
	IUnknownPtr CreateObject( BSTR Object )
	{
		IUnknownPtr spResult;
		spResult.CreateInstance( Object );
		return spResult;
	};

*/
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'ADODB' for the library: 'Microsoft ActiveX Data Objects 6.1 Library'

	#import <msado15.dll> rename("EOF","REOF")
*/
ADODB::_RecordsetPtr rs = ::CreateObject(L"ADOR.Recordset");
	rs->Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExG2antt\\Sample\\Access\\misc.accdb",ADODB::adOpenStatic,ADODB::adLockOptimistic,0);
spG2antt1->PutDataSource(((ADODB::_RecordsetPtr)(rs)));
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Position")));
	var_Column->PutFormatColumn(L"1 apos ''");
	var_Column->PutVisible(VARIANT_FALSE);
spG2antt1->GetConditionalFormats()->Add(L"(%C13 mod 4) = 0",vtMissing)->PutBackColor(RGB(240,240,240));
spG2antt1->EndUpdate();

2187
The BackColorAlternate looks fine for flat tables, but how about using it when displaying a hierarchy/tree, like grouping rows. The sample alternate colors for each group found

// LayoutChanged event - Occurs when column's position or column's size is changed.
void OnLayoutChangedG2antt1()
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
		#import <ExG2antt.dll>
		using namespace EXG2ANTTLib;
	*/
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	spG2antt1->Refresh();
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutHasLines(EXG2ANTTLib::exNoLine);
spG2antt1->PutColumnAutoResize(VARIANT_FALSE);
/*
	Includes the definition for CreateObject function like follows:

	#include <comdef.h>
	IUnknownPtr CreateObject( BSTR Object )
	{
		IUnknownPtr spResult;
		spResult.CreateInstance( Object );
		return spResult;
	};

*/
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'ADODB' for the library: 'Microsoft ActiveX Data Objects 6.1 Library'

	#import <msado15.dll> rename("EOF","REOF")
*/
ADODB::_RecordsetPtr rs = ::CreateObject(L"ADOR.Recordset");
	rs->Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExG2antt\\Sample\\Access\\misc.accdb",ADODB::adOpenStatic,ADODB::adLockOptimistic,0);
spG2antt1->PutDataSource(((ADODB::_RecordsetPtr)(rs)));
spG2antt1->PutSingleSort(VARIANT_FALSE);
spG2antt1->PutSortBarVisible(VARIANT_TRUE);
spG2antt1->PutAllowGroupBy(VARIANT_TRUE);
spG2antt1->GetColumns()->GetItem(long(1))->PutSortOrder(VARIANT_TRUE);
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Position")));
	var_Column->PutFormatColumn(L"(0:= (1 rpos '')) left ( ( 1:= ( =:0 lfind `.` ) ) != -1 ? =:1 : len(=:0))");
	var_Column->PutVisible(VARIANT_FALSE);
spG2antt1->GetConditionalFormats()->Add(L"(%C13 mod 2) != 0",vtMissing)->PutBackColor(RGB(240,240,240));
spG2antt1->EndUpdate();

2186
I need to display sub-totals in the grouping items. Is there any solution on this

// AddGroupItem event - Occurs after a new Group Item has been inserted to Items collection.
void OnAddGroupItemG2antt1(long   Item)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
		#import <ExG2antt.dll>
		using namespace EXG2ANTTLib;
	*/
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
		var_Items->PutItemDivider(Item,-1);
		var_Items->PutEnableItem(Item,VARIANT_FALSE);
		var_Items->PutCellValueFormat(Item,spG2antt1->GetTreeColumnIndex(),EXG2ANTTLib::exHTML);
		var_Items->PutFormatCell(Item,spG2antt1->GetTreeColumnIndex(),L"%1");
		var_Items->PutCellValueFormat(Item,"Freight",EXG2ANTTLib::ValueFormatEnum(EXG2ANTTLib::exTotalField | EXG2ANTTLib::exHTML));
		var_Items->PutCellValue(Item,"Freight","sum(current,dir,%6)");
		var_Items->PutFormatCell(Item,"Freight",L"`<b>` + currency(value)");
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutSelBackMode(EXG2ANTTLib::exTransparent);
spG2antt1->PutBackColorSortBar(RGB(240,240,240));
spG2antt1->PutColumnAutoResize(VARIANT_FALSE);
/*
	Includes the definition for CreateObject function like follows:

	#include <comdef.h>
	IUnknownPtr CreateObject( BSTR Object )
	{
		IUnknownPtr spResult;
		spResult.CreateInstance( Object );
		return spResult;
	};

*/
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'ADODB' for the library: 'Microsoft ActiveX Data Objects 6.1 Library'

	#import <msado15.dll> rename("EOF","REOF")
*/
ADODB::_RecordsetPtr rs = ::CreateObject(L"ADOR.Recordset");
	rs->Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExG2antt\\Sample\\Access\\misc.accdb",ADODB::adOpenStatic,ADODB::adLockOptimistic,0);
spG2antt1->PutDataSource(((ADODB::_RecordsetPtr)(rs)));
spG2antt1->PutSortBarVisible(VARIANT_TRUE);
spG2antt1->PutSortBarCaption(L"Drag a <b>column</b> header here to group by that column.");
spG2antt1->PutAllowGroupBy(VARIANT_TRUE);
spG2antt1->GetColumns()->GetItem(long(1))->PutSortOrder(EXG2ANTTLib::SortAscending);
spG2antt1->PutLinesAtRoot(EXG2ANTTLib::exGroupLinesOutside);
spG2antt1->GetColumns()->GetItem("ShipVia")->PutDisplayFilterButton(VARIANT_TRUE);
spG2antt1->EndUpdate();

2185
I use a subtotal in exTop-Item, after grouping the item shows 0. What is the solution

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutColumnAutoResize(VARIANT_FALSE);
/*
	Includes the definition for CreateObject function like follows:

	#include <comdef.h>
	IUnknownPtr CreateObject( BSTR Object )
	{
		IUnknownPtr spResult;
		spResult.CreateInstance( Object );
		return spResult;
	};

*/
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'ADODB' for the library: 'Microsoft ActiveX Data Objects 6.1 Library'

	#import <msado15.dll> rename("EOF","REOF")
*/
ADODB::_RecordsetPtr rs = ::CreateObject(L"ADOR.Recordset");
	rs->Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExG2antt\\Sample\\Access\\misc.accdb",ADODB::adOpenStatic,ADODB::adLockOptimistic,0);
spG2antt1->PutDataSource(((ADODB::_RecordsetPtr)(rs)));
spG2antt1->PutSingleSort(VARIANT_FALSE);
spG2antt1->PutAllowGroupBy(VARIANT_TRUE);
spG2antt1->PutSortBarVisible(VARIANT_TRUE);
spG2antt1->PutBackColorSortBar(spG2antt1->GetBackColor());
spG2antt1->GetColumns()->GetItem(long(5))->PutSortOrder(EXG2ANTTLib::SortAscending);
spG2antt1->GetColumns()->GetItem(long(6))->PutFormatColumn(L"currency(value)");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->PutLockedItemCount(EXG2ANTTLib::exTop,1);
	long h = var_Items->GetLockedItem(EXG2ANTTLib::exTop,0);
	var_Items->PutItemBackColor(h,RGB(240,240,240));
	var_Items->PutCellBackColor(h,long(6),RGB(190,190,190));
	var_Items->PutCellValue(h,long(6),"sum(all,rec,%6)");
	var_Items->PutCellValueFormat(h,long(6),EXG2ANTTLib::exTotalField);
spG2antt1->Refresh();
spG2antt1->EndUpdate();

2184
How can I add multiple values/columns on the same line/item/row

// Change event - Occurs when the user changes the cell's content.
void OnChangeG2antt1(long   Item,long   ColIndex,VARIANT FAR*   NewValue)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
		#import <ExG2antt.dll>
		using namespace EXG2ANTTLib;
	*/
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	spG2antt1->Refresh();
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutSortOnClick(EXG2ANTTLib::exNoSort);
spG2antt1->PutLinesAtRoot(EXG2ANTTLib::exGroupLinesOutside);
spG2antt1->PutIndent(13);
spG2antt1->PutHeaderVisible(EXG2ANTTLib::exHeaderHidden);
spG2antt1->PutLinesAtRoot(EXG2ANTTLib::exLinesAtRoot);
EXG2ANTTLib::IColumnsPtr var_Columns = spG2antt1->GetColumns();
	var_Columns->Add(L"Items");
	((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Quantity")))->GetEditor()->PutEditType(EXG2ANTTLib::SpinType);
	((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Value")))->GetEditor()->PutEditType(EXG2ANTTLib::SpinType);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Items");
	var_Items->PutCellValue(h,long(2),"sum(current,dir,dbl(%1)*dbl(%2))");
	var_Items->PutCellValueFormat(h,long(2),EXG2ANTTLib::exTotalField);
	var_Items->PutFormatCell(h,long(2),L"`Total: `+ value");
	var_Items->PutCellHAlignment(h,long(2),EXG2ANTTLib::RightAlignment);
	var_Items->PutCellBold(h,long(2),VARIANT_TRUE);
	var_Items->PutCellEditorVisible(h,long(2),EXG2ANTTLib::exEditorHidden);
	var_Items->PutCellEditorVisible(h,long(1),EXG2ANTTLib::exEditorHidden);
	long h1 = var_Items->InsertItem(h,vtMissing,"Item 1");
	var_Items->PutCellValue(h1,long(1),long(10));
	var_Items->PutCellValue(h1,long(2),long(3));
	h1 = var_Items->InsertItem(h,vtMissing,"Item 2");
	var_Items->PutCellValue(h1,long(1),long(20));
	var_Items->PutCellValue(h1,long(2),long(4));
	var_Items->PutExpandItem(h,VARIANT_TRUE);
spG2antt1->EndUpdate();

2183
Is it possible, to add more aggregate functions to grouping header

// AddGroupItem event - Occurs after a new Group Item has been inserted to Items collection.
void OnAddGroupItemG2antt1(long   Item)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
		#import <ExG2antt.dll>
		using namespace EXG2ANTTLib;
	*/
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
		var_Items->PutFormatCell(Item,var_Items->GetGroupItem(Item),L"value + ` Min: <b>` + %13 + `</b> Max: <b>` + %14 + `</b> Sum: <b>` + %15 + `</b>, of Freight column`");
		var_Items->PutCellValue(Item,"Min","min(current,all,dbl(%6))");
		var_Items->PutCellValueFormat(Item,"Min",EXG2ANTTLib::exTotalField);
		var_Items->PutCellValue(Item,"Max","max(current,all,dbl(%6))");
		var_Items->PutCellValueFormat(Item,"Max",EXG2ANTTLib::exTotalField);
		var_Items->PutCellValue(Item,"Sum","sum(current,all,dbl(%6))");
		var_Items->PutCellValueFormat(Item,"Sum",EXG2ANTTLib::exTotalField);
}

// Change event - Occurs when the user changes the cell's content.
void OnChangeG2antt1(long   Item,long   ColIndex,VARIANT FAR*   NewValue)
{
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	spG2antt1->Refresh();
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutHasLines(EXG2ANTTLib::exNoLine);
spG2antt1->PutColumnAutoResize(VARIANT_FALSE);
/*
	Includes the definition for CreateObject function like follows:

	#include <comdef.h>
	IUnknownPtr CreateObject( BSTR Object )
	{
		IUnknownPtr spResult;
		spResult.CreateInstance( Object );
		return spResult;
	};

*/
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'ADODB' for the library: 'Microsoft ActiveX Data Objects 6.1 Library'

	#import <msado15.dll> rename("EOF","REOF")
*/
ADODB::_RecordsetPtr rs = ::CreateObject(L"ADOR.Recordset");
	rs->Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExG2antt\\Sample\\Access\\misc.accdb",ADODB::adOpenStatic,ADODB::adLockOptimistic,0);
spG2antt1->PutDataSource(((ADODB::_RecordsetPtr)(rs)));
spG2antt1->PutSingleSort(VARIANT_FALSE);
spG2antt1->PutSortBarVisible(VARIANT_TRUE);
spG2antt1->PutAllowGroupBy(VARIANT_TRUE);
spG2antt1->GetColumns()->GetItem(long(1))->PutSortOrder(VARIANT_TRUE);
EXG2ANTTLib::IColumnsPtr var_Columns = spG2antt1->GetColumns();
	((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Min")))->PutVisible(VARIANT_FALSE);
	((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Max")))->PutVisible(VARIANT_FALSE);
	((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Sum")))->PutVisible(VARIANT_FALSE);
spG2antt1->EndUpdate();

2182
Is it possible to display more aggregate functions to a single cell (method 2)

// Change event - Occurs when the user changes the cell's content.
void OnChangeG2antt1(long   Item,long   ColIndex,VARIANT FAR*   NewValue)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
		#import <ExG2antt.dll>
		using namespace EXG2ANTTLib;
	*/
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	spG2antt1->Refresh();
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutSortOnClick(EXG2ANTTLib::exNoSort);
spG2antt1->PutLinesAtRoot(EXG2ANTTLib::exGroupLinesOutside);
spG2antt1->PutIndent(13);
spG2antt1->PutHeaderVisible(EXG2ANTTLib::exHeaderHidden);
spG2antt1->PutLinesAtRoot(EXG2ANTTLib::exLinesAtRoot);
EXG2ANTTLib::IColumnsPtr var_Columns = spG2antt1->GetColumns();
	var_Columns->Add(L"Items");
	((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Quantity")))->GetEditor()->PutEditType(EXG2ANTTLib::SpinType);
	((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Sum")))->PutVisible(VARIANT_FALSE);
	((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Min")))->PutVisible(VARIANT_FALSE);
	((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Max")))->PutVisible(VARIANT_FALSE);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Items");
	var_Items->PutCellMerge(h,long(0),long(1));
	var_Items->PutFormatCell(h,long(0),L"`Items, <b>sum(` + %2 + `), min(` + %3 + `), max(` + %4 + `)</b>`");
	var_Items->PutCellValueFormat(h,long(0),EXG2ANTTLib::exHTML);
	var_Items->PutCellValue(h,long(2),"sum(current,dir,dbl(%1))");
	var_Items->PutCellValueFormat(h,long(2),EXG2ANTTLib::exTotalField);
	var_Items->PutCellValue(h,long(3),"min(current,dir,dbl(%1))");
	var_Items->PutCellValueFormat(h,long(3),EXG2ANTTLib::exTotalField);
	var_Items->PutCellValue(h,long(4),"max(current,dir,dbl(%1))");
	var_Items->PutCellValueFormat(h,long(4),EXG2ANTTLib::exTotalField);
	var_Items->PutCellValue(var_Items->InsertItem(h,vtMissing,"Item 1"),long(1),long(10));
	var_Items->PutCellValue(var_Items->InsertItem(h,vtMissing,"Item 2"),long(1),long(20));
	var_Items->PutCellValue(var_Items->InsertItem(h,vtMissing,"Item 3"),long(1),long(30));
	var_Items->PutExpandItem(h,VARIANT_TRUE);
spG2antt1->EndUpdate();

2181
How can I use the current in the aggregate/total field

// Change event - Occurs when the user changes the cell's content.
void OnChangeG2antt1(long   Item,long   ColIndex,VARIANT FAR*   NewValue)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
		#import <ExG2antt.dll>
		using namespace EXG2ANTTLib;
	*/
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	spG2antt1->Refresh();
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutSortOnClick(EXG2ANTTLib::exNoSort);
spG2antt1->PutLinesAtRoot(EXG2ANTTLib::exGroupLinesOutside);
spG2antt1->PutIndent(13);
spG2antt1->PutHeaderVisible(EXG2ANTTLib::exHeaderHidden);
spG2antt1->PutLinesAtRoot(EXG2ANTTLib::exLinesAtRoot);
EXG2ANTTLib::IColumnsPtr var_Columns = spG2antt1->GetColumns();
	var_Columns->Add(L"Items");
	((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Quantity")))->GetEditor()->PutEditType(EXG2ANTTLib::SpinType);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Items");
	var_Items->PutCellValue(h,long(1),"sum(current,dir,dbl(%1))");
	var_Items->PutCellValueFormat(h,long(1),EXG2ANTTLib::exTotalField);
	var_Items->PutFormatCell(h,long(1),L"`Total: `+ value");
	var_Items->PutCellValue(var_Items->InsertItem(h,vtMissing,"Item 1"),long(1),long(10));
	var_Items->PutCellValue(var_Items->InsertItem(h,vtMissing,"Item 2"),long(1),long(20));
	var_Items->PutCellValue(var_Items->InsertItem(h,vtMissing,"Item 3"),long(1),long(30));
	var_Items->PutExpandItem(h,VARIANT_TRUE);
spG2antt1->EndUpdate();

2180
The CellValue/CellCaption property gets the result of a computed/total field with text formatting. Is it possible to get that value without text formatting

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"A")))->GetEditor()->PutEditType(EXG2ANTTLib::SpinType);
((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"B")))->GetEditor()->PutEditType(EXG2ANTTLib::SpinType);
spG2antt1->GetColumns()->Add(L"A+B");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem(long(10));
	var_Items->PutCellValue(h,long(1),long(20));
	var_Items->PutCellValueFormat(h,long(2),EXG2ANTTLib::exComputedField);
	var_Items->PutCellValue(h,long(2),"currency(dbl(%0)+dbl(%1))");
	OutputDebugStringW( L"CellCaption returns " );
	OutputDebugStringW( var_Items->GetCellCaption(h,long(2)) );
	OutputDebugStringW( L"CellValue returns " );
	OutputDebugStringW( _bstr_t(var_Items->GetCellValue(h,long(2))) );
	OutputDebugStringW( L"ComputeValue returns " );
	OutputDebugStringW( _bstr_t(var_Items->GetComputeValue("dbl(%0)+dbl(%1)",h,long(0),var_Items->GetCellValueFormat(h,long(2)))) );
spG2antt1->EndUpdate();

2179
Can I get the result of a specified formula as your control does using the ComputedField property
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetColumns()->Add(L"A");
spG2antt1->GetColumns()->Add(L"B");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem(long(10));
	var_Items->PutCellValue(h,long(1),long(20));
	OutputDebugStringW( L"A+B is " );
	OutputDebugStringW( _bstr_t(var_Items->GetComputeValue("dbl(%0)+dbl(%1)",h,long(0),long(2))) );
spG2antt1->EndUpdate();

2178
Is it possible to get the text without HTML formatting
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetColumns()->Add(L"");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("<b>bold</b>");
	OutputDebugStringW( _bstr_t(var_Items->GetComputeValue(var_Items->GetCellValue(h,long(0)),h,long(0),long(1))) );
spG2antt1->EndUpdate();

2177
Transparent/Border SummaryBar

// AddGroupItem event - Occurs after a new Group Item has been inserted to Items collection.
void OnAddGroupItemG2antt1(long   Item)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
		#import <ExG2antt.dll>
		using namespace EXG2ANTTLib;
	*/
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
		var_Items->PutItemDividerLine(Item,EXG2ANTTLib::EmptyLine);
		var_Items->AddBar(Item,"Summary",COleDateTime(2017,12,2,0,00,00).operator DATE(),COleDateTime(2017,12,2,0,00,00).operator DATE(),vtMissing,vtMissing);
		var_Items->DefineSummaryBars(Item,"",-3,"");
}

// AddItem event - Occurs after a new Item has been inserted to Items collection.
void OnAddItemG2antt1(long   Item)
{
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	spG2antt1->GetItems()->AddBar(Item,"Task",COleDateTime(2017,12,4,0,00,00).operator DATE(),COleDateTime(2017,12,10,0,00,00).operator DATE(),vtMissing,vtMissing);
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetVisualAppearance()->Add(1,_bstr_t("gBFLBCJwBAEHhEJAAEhABHEGACAADACAxRDgMQBQKAAzQFAYbBuGCGAAGIYBTgmFgAQhFcZQSKUOQTDKMIziaQJiYLBIaRgEUTRXASCQxDBKQBSeKkRRtDaOYDnGQYD") +
"iCIouQLEIxDKItBSJCKURJkAZZHjeToSR5PMb0dKdAw5I6raShEaaIiqJIXP7Fc7QSA0EgTBIFajgOpQAb+bptW7FVDULTMQS5FCZKasOA7FgOZ4DWjUVpwTZ1Q4LC65" +
"bjuaraawKbYbXrFYJQSA8EwjNjDcLuKqcKpvDJsSJIFKxOB2KYtBLMLbzLR5apjLZ0QLSOKRDoMEgRDYGdKjLScGrGao8ABtcBlAZJRjoOo5DJgeCQapUQhNczGQzQSI" +
"iBOJZAFSQwRHcJhGh2BZvngMIeA8H4TksA5ylgZBeg8X4GmGX4nniPazneQ5VnKdp9H8P4vD+X57nMRofmgBZ4FgIAoBWdoBGAGAeAgfxfjgNZ1DqWxEA0ASAgA==");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutLevelCount(2);
	var_Chart->PutFirstVisibleDate(COleDateTime(2017,12,2,0,00,00).operator DATE());
	var_Chart->PutPaneWidth(VARIANT_FALSE,256);
	EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->GetItem("Summary");
		var_Bar->PutColor(0x1000000);
		var_Bar->PutDef(EXG2ANTTLib::exBarCaption,"<%=%513%>");
		var_Bar->PutDef(EXG2ANTTLib::exBarHAlignCaption,long(18));
		var_Bar->PutDef(EXG2ANTTLib::exBarCaptionHOffset,long(8));
	EXG2ANTTLib::IBarPtr var_Bar1 = var_Chart->GetBars()->GetItem("Task");
		var_Bar1->PutPattern(EXG2ANTTLib::exPatternBox);
		var_Bar1->PutColor(RGB(0,0,0));
EXG2ANTTLib::IColumnsPtr var_Columns = spG2antt1->GetColumns();
	var_Columns->Add(L"C1");
	var_Columns->Add(L"C2");
	EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Pos")));
		var_Column->PutFormatColumn(L"1 pos ``");
		var_Column->PutAllowGroupBy(VARIANT_FALSE);
		var_Column->PutPosition(0);
		var_Column->PutWidth(48);
		var_Column->PutAllowSizing(VARIANT_FALSE);
spG2antt1->PutSortBarVisible(VARIANT_TRUE);
spG2antt1->PutAllowGroupBy(VARIANT_TRUE);
spG2antt1->PutBackColorSortBar(spG2antt1->GetBackColor());
spG2antt1->PutHeaderAppearance(EXG2ANTTLib::Etched);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->PutCellValue(var_Items->AddItem("Item A"),long(1),"SubItem A.1");
	var_Items->PutCellValue(var_Items->AddItem("Item A"),long(1),"SubItem A.2");
	var_Items->PutCellValue(var_Items->AddItem("Item A"),long(1),"SubItem A.3");
	var_Items->PutCellValue(var_Items->AddItem("Item A"),long(1),"SubItem A.4");
	var_Items->PutCellValue(var_Items->AddItem("Item B"),long(1),"SubItem B.1");
	var_Items->PutCellValue(var_Items->AddItem("Item B"),long(1),"SubItem B.2");
spG2antt1->GetColumns()->GetItem(long(0))->PutSortOrder(EXG2ANTTLib::SortAscending);
spG2antt1->EndUpdate();

2176
The bar's caption is very difficult to read if any pattern than exPatternSolid is used. Is there any way of displaying the bar's caption (except for displaying the caption outside the bar)

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetFont()->PutSize(_variant_t(long(12)));
spG2antt1->PutDefaultItemHeight(24);
spG2antt1->GetColumns()->Add(L"Task");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutLevelCount(2);
	var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
	EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->GetItem("Task");
		var_Bar->PutHeight(21);
		var_Bar->PutPattern(EXG2ANTTLib::exPatternDiagCross);
	var_Chart->PutPaneWidth(VARIANT_FALSE,128);
	var_Chart->PutUnitWidth(24);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),"",vtMissing);
	var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarCaption,"to do");
	h = var_Items->AddItem("bgcolor");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),"",vtMissing);
	var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarCaption,"<bgcolor=FFFFFF> to do </bgcolor>");
	h = var_Items->AddItem("fgcolor");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),"",vtMissing);
	var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarCaption,"<fgcolor=FFFFFF> to do </fgcolor>");
	h = var_Items->AddItem("sha");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),"",vtMissing);
	var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarCaption,"<sha FFFFFF;2;2> to do </sha>");
	h = var_Items->AddItem("out");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),"",vtMissing);
	var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarCaption,"<out 000000><fgcolor=FFFFFF>to do</fgcolor></out></font>");
	h = var_Items->AddItem("gra");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),"",vtMissing);
	var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarCaption,"<fgcolor FFFFFF><gra 000000;1;1>to do</fgcolor>");
spG2antt1->EndUpdate();

2175
How can I change the position of the bar's tooltip

// ToolTip event - Fired when the control prepares the object's tooltip.
void OnToolTipG2antt1(long   Item,long   ColIndex,BOOL FAR*   Visible,long FAR*   X,long FAR*   Y,long   CX,long   CY)
{
	OutputDebugStringW( L"ToolTip" );
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
		#import <ExG2antt.dll>
		using namespace EXG2ANTTLib;
	*/
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	OutputDebugStringW( L"Item" );
	OutputDebugStringW( L"ColIndex" );
	OutputDebugStringW( L"Visible" );
	OutputDebugStringW( L"X" );
	OutputDebugStringW( L"Y" );
	OutputDebugStringW( L"CX" );
	OutputDebugStringW( L"CY" );
	X = spG2antt1->FormatABC(L"value + 8",X,vtMissing,vtMissing);
	Y = spG2antt1->FormatABC(L"value - 8",Y,vtMissing,vtMissing);
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetColumns()->Add(L"Task");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutPaneWidth(VARIANT_FALSE,64);
	var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
	var_Chart->GetBars()->GetItem("Task")->PutDef(EXG2ANTTLib::exBarToolTip,"<b><%=%9 + '/' + %C0%></b><br><upline><dotline>Start: <%=%1%><br>End: <%=%2%><br>Duration: <%=(%2-%1)%><br>Working: <%=%258%>");
	var_Chart->PutLevelCount(2);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddBar(var_Items->AddItem("Tasks A"),"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("Tasks B"),"Task",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,8,0,00,00).operator DATE(),vtMissing,vtMissing);
spG2antt1->EndUpdate();

2174
How can I replace the cell's context menu ( while edit mode is running )

// RClick event - Fired when right mouse button is clicked
void OnRClickG2antt1()
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
		#import <ExG2antt.dll>
		using namespace EXG2ANTTLib;
	*/
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	OutputDebugStringW( L"Edit Mode: " );
	OutputDebugStringW( _bstr_t(spG2antt1->GetEditing()) );
	/*
		Includes the definition for CreateObject function like follows:
		#include <comdef.h>
		IUnknownPtr CreateObject( BSTR Object )
		{
			IUnknownPtr spResult;
			spResult.CreateInstance( Object );
			return spResult;
		};
	*/
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXCONTEXTMENULib' for the library: 'ExContextMenu 1.0 Type Library'
		#import <ExContextMenu.dll>
		using namespace EXCONTEXTMENULib;
	*/
	EXCONTEXTMENULib::IExContextMenuPtr var_ExContextMenu = ::CreateObject(L"Exontrol.ContextMenu");
		var_ExContextMenu->GetItems()->PutToString(L"Check[chk],[sep],Item 1,Item 2,Item 3,Popup(A,B,C)");
		OutputDebugStringW( _bstr_t(var_ExContextMenu->Select(vtMissing,vtMissing,vtMissing)) );
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutHeaderAppearance(EXG2ANTTLib::Flat);
EXG2ANTTLib::IEditorPtr var_Editor = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Column")))->GetEditor();
	var_Editor->PutEditType(EXG2ANTTLib::EditType);
	var_Editor->PutOption(EXG2ANTTLib::exEditAllowContextMenu,VARIANT_FALSE);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddItem("Item 1");
	var_Items->AddItem("Item 2");
spG2antt1->EndUpdate();

2173
Is it possible to highlight the column's header once a filter is applied (sample 2)

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
EXG2ANTTLib::IAppearancePtr var_Appearance = spG2antt1->GetVisualAppearance();
	var_Appearance->Add(1,_bstr_t("gBFLBCJwBAEHhEJAAEhABO8GACAADACAxRDgMQBQKAAzQFAYbBuGCGAAGIYBTgmFgAQhFcZQSKUOQTDKNYykCIRSDUJYkSZEIyjBI8ExXFqNACkGKwQgmNYDSBMcbwS") +
"AsXRYFocJ5gOT6AjKBA2UclEZpajiTY3ABUEgUS5oOBIACqariaQJAAiCRQGiYZyHKaRSwPBKFYDIIjbJheTIDChNVxUcDENQjJqLBIDRzbarye59YBfeBXdgmA4LQbD" +
"MRwNgMMQTDqKYbkOQZHbeGKAWTMEZzJj8cxTEqIaBhGTLfojSZMS7UGK1LLtMyHI6kP7sOiLfi2W4/W7XV72F79TzXIa2ZBuO57bhnAZ/VzGNj4PRNezfRqicjsGxcZw" +
"Xg+TpQj0ew6gSOw7wSbozjsfYXi8PwMnSc52leHotl+MxjmoXh2nybxOH+SQtnYXx+D2P4vGMB56hQf5PCgBYeDwYBCEo1xggebgKH6IIDBYBgkiAQ5FgYPAhEIRgWGq" +
"DBoC4GoCiGCBYhGBQPAWdIQp0eIUiWCZigiJgqgqYpIioJQhmIMhBH0NxjEMag2g2Y4ImYOoOmOSJeDQNxXlOLR3ECUAQICA=");
	var_Appearance->Add(2,_bstr_t("gBFLBCJwBAEHhEJAAEhABgsHQAAYAQGKIcBiAKBQAGaAoDDYNwwQwAAxDAKcEwsACEIrjKCRShyCYZRrGUgRCKQahLEiTIhGUYJHgmK4tRoAUgxWCEExrAaQJjjeCQF") +
"i6LAtDhPMByfQEZQIGyjkgjNLUcSbG4AKgkCiXfpUAJVP7FcgSABEEigNIxToOU4jFgeCYLQKQRK2RC9GQGFCbLhpYKIahGTYWVheN5XXblez9P7ABQwKCcAwXBp7YIK" +
"AT4XBIdYdQ7IL4xGA0AJPFoJC7mOQ5XiYAIBAZ/RL0LCcbxHHafVboQj6JouD5PUDVNY1XBdPynI6CbLhWy6Dq4UZzPwzeBifSHfDjRoJcCZe71KY3GwSEboNA6Kp+QB" +
"HAmZoZjSPYIEiF47lOLJVnuYofBwJJHmaQoYj0MIRHeM4/m6cJ8B+fpBHQJ5SGKPYYH8OYMk+P5Bn4fxaAYZAvEIX4RgUWBGgCCAmAqApgkgNgOgMEYlGASoEkQeBWBa" +
"BZhggZgagaYRoEwShWA6NZZAMQBAICA==");
spG2antt1->PutBackground(EXG2ANTTLib::exHeaderFilterBarButton,0x1000000);
spG2antt1->PutBackground(EXG2ANTTLib::exHeaderFilterBarActive,0x2000000);
spG2antt1->PutBackground(EXG2ANTTLib::exCursorHoverColumn,-1);
spG2antt1->PutHeaderHeight(28);
spG2antt1->PutBackColorHeader(RGB(255,255,255));
spG2antt1->PutDrawGridLines(EXG2ANTTLib::exRowLines);
spG2antt1->PutHeaderVisible(EXG2ANTTLib::exHeaderVisibleExtendLevels);
EXG2ANTTLib::IColumnsPtr var_Columns = spG2antt1->GetColumns();
	((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"C1")))->PutDisplayFilterButton(VARIANT_TRUE);
	EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"C2")));
		var_Column->PutDisplayFilterButton(VARIANT_TRUE);
		var_Column->PutFilter(L"Item 2");
		var_Column->PutFilterType(EXG2ANTTLib::exFilter);
	((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"C3")))->PutDisplayFilterButton(VARIANT_TRUE);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Item 1");
	var_Items->PutCellValue(h,long(1),"Item 2");
	var_Items->PutCellValue(h,long(2),"Item 3");
	h = var_Items->AddItem("Item 4");
	var_Items->PutCellValue(h,long(1),"Item 5");
	var_Items->PutCellValue(h,long(2),"Item 6");
spG2antt1->ApplyFilter();
spG2antt1->EndUpdate();

2172
How can I make the expand/collapse glyphs DPI aware

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
_bstr_t size = 2;
spG2antt1->BeginUpdate();
EXG2ANTTLib::IAppearancePtr var_Appearance = spG2antt1->GetVisualAppearance();
	var_Appearance->Add(3,_bstr_t("gBFLBCJwBAEHhEJAAEhEGAUHQAAYAQGKIcBiAKBQAGaAoDDYOA4QwAAxDAKcEwsACEIrjKCRShyCYZRhGcTSBCIZBqEqSZLiEZRQiiCYsS5GQBRfIUEghGyNZjgNzQc") +
"CQAI8T5IUgARBJIDSMY6DpOIxYHgmC4DEITNLxOK0EhRHCBZrgOCAYhqEY1Ro+dhPFYjVTMdK0LRtKy7Mq2aJmOpZDxWE7dZKpO5fbxXS67cr2fp/YBed4rfa7KTlOBK" +
"cRQRBEFQPDqPZBkORZHh2FoLRJKbgtHJmHYNQWhVyYBbNCyTI6lahpeuHBx1QaWWxjbCMEr6bpoWLbFi3Ha1UzrPa8b5vSw7Gr+HzYQTHGPXGqaYJdZrnea6B7+U5XUJ" +
"rnSOZciYHwhAeR5HDK+JVGqKRRmScx5HyfRei+H5bmmcp4Fi8o/CGGJKGQKZUGoFQigUPIiCeSZXnyHB6l0SAJn8JxfkIeZ5CgXxjCCAhyB8QgIlAM4MlKAIcCaIBIGY" +
"GoGGEYhqBMMxgnICgRDUDQjESGwmAkWBuCqBoiHIVgkDQYgYESWg2E0YhohcJQigITg3CQSRyEyEYGGOWJwhQJD4FiFIMk0aJFGsIBkkOBJeDc+AchYJwJgIWhSgYZQp" +
"FIVoVGOGQ4l2EwIBWMhgDmDhThCEwkAiaJchKDhjhgZhsCUY4iFCEoZkiaYQmSGAWhWQhgDuDpTjCDQiEgchAg0IpJBoDoFiEKBqCaCAimgIguH8IZnkPUhcBcJg+hGJ" +
"ZnloYJsiaKZKGa24YnWSR0CkKhCA2CxlCqColhAYpqEKER0DqVZ0A0ASAgA==");
	var_Appearance->Add(4,_bstr_t("gBFLBCJwBAEHhEJAAEhABAQCg6AADACAxRDgMQBQKAAzQFAYbBwHCGAAGIYBTgmFgAQhFcZQSKUOQTDKNYykCIRSDUJYkSZEIyjBI8ExXFqNACjeQYJBCNYbTJAbqhY") +
"IgAR3HqQZABCCSQKkYx0HScRiwPBMFwGIQmaaicZoJCiN4DTZAcIBRDUIxpDR9bBeKw3KqVaZnWhaNpWXZlTzKdSxXisF67RZSdi/XgvF5XXblez9P69LwXe5mUrGbyV" +
"YghCCIKgeG4dR7IMhyLDcKQXCCVW7aGSsOwbAqAXpdGAXTQdDyLJKnaZqOi6BjjA4rNbHGIYJb1XTRMa1LJuG5LJrOeZ3Xre4BLfh1VoFRpjWIYNY1QS7TLOczzfRdDx" +
"TiGVpkjCeJoD4Ng1hSRxiisVRKg8D4PkWZJznmPQ+F8Xx5guWpjHGWYMiYQodEaIRSCgU5KCSeh3naHB/iAAh9n8fwfgIeZ1CgXwjCCAhxl8AgIlAM4MlKAIcCaD54FY" +
"FoFmGCBmBaBIJigPJNgKSAoDSVC+BIbIYCUYYoiYKoJgkWIMlGCAglMaJZDWCYiFyFIJkkOJYhEJc7G4PYPCOaJshQJBjgiVIUgyDRokEaggGSQ4El4N1CBiFgnAmAha" +
"FKFZlFkShUhWJRYmITg3GSQgFGuGBOGOFJkCSSQCDoNgkiOCY0hUJJmmmQhvhqZtYmUOQmBWIRvhgTpjjSbAjEiEgchBZgyEaBIhigWgegqIhIjoDILiACB5nTL5WnWR" +
"YOiSKYJnqGQ7CmOh2hqJ5OkYORxFyShKhSAxihkOomioY5YiqFIkFyTo1HkAxAEAgIA==");
	var_Appearance->Add(1,spG2antt1->FormatABC(L"`CP:3 -` + int(value*dpi) + ` -` + int(value*dpi) + ` ` +  int(value*dpi) + ` ` + int(value*dpi)",size,vtMissing,vtMissing));
	var_Appearance->Add(2,spG2antt1->FormatABC(L"`CP:4 -` + int(value*dpi) + ` -` + int(value*dpi) + ` ` +  int(value*dpi) + ` ` + int(value*dpi)",size,vtMissing,vtMissing));
spG2antt1->PutLinesAtRoot(EXG2ANTTLib::exGroupLinesAtRoot);
spG2antt1->PutHasButtons(EXG2ANTTLib::exCustom);
spG2antt1->PutHasButtonsCustom(VARIANT_FALSE,16777216);
spG2antt1->PutHasButtonsCustom(VARIANT_TRUE,33554432);
spG2antt1->GetColumns()->Add(L"Column");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Root 1");
	var_Items->InsertItem(h,vtMissing,"Child 1");
	var_Items->InsertItem(h,vtMissing,"Child 2");
	var_Items->PutExpandItem(h,VARIANT_TRUE);
	h = var_Items->AddItem("Root 2");
	var_Items->InsertItem(h,vtMissing,"Child");
spG2antt1->EndUpdate();

2171
Is it possible to highlight the column's header once a filter is applied (sample 1)

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
EXG2ANTTLib::IAppearancePtr var_Appearance = spG2antt1->GetVisualAppearance();
	var_Appearance->Add(2,_bstr_t("gBFLBCJwBAEHhEJAAEhABX8GACAADACAxSDEMQBQKAAzQFAYbhgHCGAAGQaBUgmFgAQhFcZQSKUOQTDKNYykCIRSDUJYkSZEIyjBI8ExXFqNACkGKwYgmNYiTLAcgAN") +
"J0WBaGIZJ4gOT5fDKMoEDRRYADFCscwxJybQAqGQKKb+VgAVY/cTyBIAEQSKA0TDOQ5TSKWB4JPZQRBEbZMNBtBIUJquKaqShdQJCU5FdY3Xblez9P7AMBwLFEC4NQ8Y" +
"NYuPhjR4dRTIMhvVAsUArFh8Zg9GZZFjmDIDT4ydBLTQwcyVIKnP5qOa6XbmPoCQDYKxZHYxPzVDa3axuL76dqCAT7XrXNy1TbNRrzQKfcJqfCbdw2YaDZLOOT3fjuI4" +
"hhKaRzFAHJ+jYQ4xHuY4gHuGIXGeExqC8Tp6C+PoEm+G5ImycRgh0XwvDGa5rgOeoejyXwnFeQp2mkf5ClgBB9gCWIYAwfYAEKV58mkdwOggNArgOXY2EWLoDkKOA0mg" +
"bhOGgZApgaSBIHWSYHSmbApgYThmESZYJkIeIkgeCpfliLIHgpMIcmUYYYmODAlg2SI4mWfRfGOEguDcCRjFYAJihCQhJBSDoRmONgKEcI4kFCEJhhOVYTmYnAlEAQhW" +
"BMJYJGYWoWmWSR2F6F5lnkWAQhUAgpEieRWEuSYkjWGpmkmNhuhuZwJkYcocmaaYkjyEhngnUA6lEFAlAEgI=");
	var_Appearance->Add(1,"CP:2 -8 -4 2 4");
spG2antt1->PutBackground(EXG2ANTTLib::exHeaderFilterBarButton,0x1fefefe);
spG2antt1->PutBackground(EXG2ANTTLib::exHeaderFilterBarActive,0x1010101);
spG2antt1->PutBackground(EXG2ANTTLib::exCursorHoverColumn,-1);
spG2antt1->PutHeaderHeight(28);
spG2antt1->PutBackColorHeader(RGB(255,255,255));
spG2antt1->PutDrawGridLines(EXG2ANTTLib::exRowLines);
spG2antt1->PutHeaderVisible(EXG2ANTTLib::exHeaderVisibleExtendLevels);
EXG2ANTTLib::IColumnsPtr var_Columns = spG2antt1->GetColumns();
	((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"C1")))->PutDisplayFilterButton(VARIANT_TRUE);
	EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"C2")));
		var_Column->PutDisplayFilterButton(VARIANT_TRUE);
		var_Column->PutFilter(L"Item 2");
		var_Column->PutFilterType(EXG2ANTTLib::exFilter);
	((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"C3")))->PutDisplayFilterButton(VARIANT_TRUE);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Item 1");
	var_Items->PutCellValue(h,long(1),"Item 2");
	var_Items->PutCellValue(h,long(2),"Item 3");
	h = var_Items->AddItem("Item 4");
	var_Items->PutCellValue(h,long(1),"Item 5");
	var_Items->PutCellValue(h,long(2),"Item 6");
spG2antt1->ApplyFilter();
spG2antt1->EndUpdate();

2170
How do I update itemcount and matchitemcount of the FilterBarCaption after I added the item using the AddItem method
// Click event - Occurs when the user presses and then releases the left mouse button over the tree control.
void OnClickG2antt1()
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
		#import <ExG2antt.dll>
		using namespace EXG2ANTTLib;
	*/
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	spG2antt1->GetItems()->AddItem("new");
	spG2antt1->Refresh();
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetChart()->PutPaneWidth(VARIANT_TRUE,0);
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Item")));
	var_Column->PutDisplayFilterButton(VARIANT_TRUE);
	var_Column->PutFilterList(EXG2ANTTLib::FilterListEnum(EXG2ANTTLib::exShowExclude | EXG2ANTTLib::exShowFocusItem | EXG2ANTTLib::exShowCheckBox | EXG2ANTTLib::exSortItemsAsc));
EXG2ANTTLib::IColumnPtr var_Column1 = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Pos")));
	var_Column1->PutAllowSizing(VARIANT_FALSE);
	var_Column1->PutAllowSort(VARIANT_FALSE);
	var_Column1->PutWidth(32);
	var_Column1->PutFormatColumn(L"1 apos ``");
	var_Column1->PutPosition(0);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddItem("Item A");
	var_Items->AddItem("Item B");
	var_Items->AddItem("Item C");
spG2antt1->PutFilterBarCaption(_bstr_t("`<r>` + value + `</b><fgcolor=808080>` + ( matchitemcount < 0 ? ( ( len(value) ? `<br>` : `` ) + `<r>` + abs(matchitemcount + 1") +
") + ` result(s)` ) : (`<fgcolor=808080>`+ itemcount + ` item(s)`) )");
spG2antt1->PutFilterBarPromptVisible(EXG2ANTTLib::FilterBarVisibleEnum(EXG2ANTTLib::exFilterBarCompact | EXG2ANTTLib::exFilterBarShowCloseOnRight | EXG2ANTTLib::exFilterBarShowCloseIfRequired | EXG2ANTTLib::exFilterBarCaptionVisible | EXG2ANTTLib::exFilterBarVisible | EXG2ANTTLib::exFilterBarPromptVisible));
spG2antt1->EndUpdate();

2169
The Edit method does not work while ReadOnly property is exLocked and the first column is hidden. Is there any fix

// DblClick event - Occurs when the user dblclk the left mouse button over an object.
void OnDblClickG2antt1(short   Shift,long   X,long   Y)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
		#import <ExG2antt.dll>
		using namespace EXG2ANTTLib;
	*/
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	long var_ItemFromPoint = spG2antt1->GetItemFromPoint(-1,-1,c,hit);
	spG2antt1->PutFocusColumnIndex(c);
	spG2antt1->Edit(vtMissing);
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetChart()->PutPaneWidth(VARIANT_TRUE,0);
spG2antt1->PutHeaderAppearance(EXG2ANTTLib::Etched);
spG2antt1->PutAutoEdit(VARIANT_FALSE);
spG2antt1->PutReadOnly(EXG2ANTTLib::exLocked);
spG2antt1->PutAutoSearch(VARIANT_TRUE);
((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"")))->PutVisible(VARIANT_FALSE);
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Contains")));
	var_Column->PutAutoSearch(EXG2ANTTLib::exContains);
	var_Column->GetEditor()->PutEditType(EXG2ANTTLib::EditType);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->PutCellValue(var_Items->AddItem(vtMissing),long(1),"Tom Hanks");
	var_Items->PutCellValue(var_Items->AddItem(vtMissing),long(1),"Leonardo DiCaprio");
	var_Items->PutCellValue(var_Items->AddItem(vtMissing),long(1),"Will Smith");
	var_Items->PutCellValue(var_Items->AddItem(vtMissing),long(1),"Tom Cruise");
spG2antt1->EndUpdate();

2168
How can I highlight the cell's button with a different appearance, when cursor hovers it

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetVisualAppearance()->Add(1,"c:\\exontrol\\images\\normal.ebn");
spG2antt1->PutDefaultItemHeight(22);
spG2antt1->PutTreeColumnIndex(-1);
spG2antt1->PutSelForeColor(RGB(0,0,0));
spG2antt1->PutSelBackColor(spG2antt1->GetBackColor());
spG2antt1->PutBackground(EXG2ANTTLib::exCursorHoverCellButton,0x1000000);
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Buttons")));
	var_Column->PutDef(EXG2ANTTLib::exCellHasButton,VARIANT_TRUE);
	var_Column->PutDef(EXG2ANTTLib::exCellValueFormat,long(1));
	var_Column->PutAlignment(EXG2ANTTLib::CenterAlignment);
	var_Column->PutHeaderAlignment(EXG2ANTTLib::CenterAlignment);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddItem("Button <b>1</b>");
	var_Items->AddItem("Button <b>2</b>");
	var_Items->AddItem("Button <b>3</b>");
spG2antt1->EndUpdate();

2167
How to group one or more operations into a block when the user do undo or redo

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetColumns()->Add(L"Tasks");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutAllowUndoRedo(VARIANT_TRUE);
	var_Chart->PutFirstVisibleDate(COleDateTime(2005,6,20,0,00,00).operator DATE());
	var_Chart->PutAllowLinkBars(VARIANT_TRUE);
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,64);
	var_Chart->GetBars()->GetItem("Task")->PutHeight(16);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->StartBlockUndoRedo();
	var_Items->AddBar(var_Items->AddItem("Task 1"),"Task",COleDateTime(2005,6,23,0,00,00).operator DATE(),COleDateTime(2005,6,27,0,00,00).operator DATE(),"",vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 2"),"Task",COleDateTime(2005,6,28,0,00,00).operator DATE(),COleDateTime(2005,7,2,0,00,00).operator DATE(),"",vtMissing);
	var_Items->AddLink("L1",var_Items->GetItemByIndex(0),"",var_Items->GetItemByIndex(1),"");
	var_Items->EndBlockUndoRedo();
	long h = var_Items->GetItemByIndex(1);
EXG2ANTTLib::INotePtr var_Note = spG2antt1->GetChart()->GetNotes()->Add("NoteD",h,COleDateTime(2005,6,26,0,00,00).operator DATE(),L"CTRL+Z (undo), CTRL+Y (redo)");
	var_Note->PutPartShadow(EXG2ANTTLib::exNoteEnd,VARIANT_FALSE);
	var_Note->PutPartToolTip(EXG2ANTTLib::exNoteEnd,L"Press CTRL+Z to undo <br> and then press CTRL+Y to redo");
	var_Note->PutPartTransparency(EXG2ANTTLib::exNoteEnd,25);
	var_Note->PutPartVOffset(EXG2ANTTLib::exNoteEnd,-2);
	var_Note->PutPartBackColor(EXG2ANTTLib::exNoteEnd,RGB(255,255,0));
spG2antt1->EndUpdate();

2166
I am using the Link property to customize the link, but when I press redo it (CTRL+Y) to redo it, not all properties are restored. What can be done

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetColumns()->Add(L"Tasks");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutAllowUndoRedo(VARIANT_TRUE);
	var_Chart->PutFirstVisibleDate(COleDateTime(2005,6,20,0,00,00).operator DATE());
	var_Chart->PutAllowLinkBars(VARIANT_TRUE);
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,64);
	var_Chart->GetBars()->GetItem("Task")->PutHeight(16);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddBar(var_Items->AddItem("Task 1"),"Task",COleDateTime(2005,6,23,0,00,00).operator DATE(),COleDateTime(2005,7,1,0,00,00).operator DATE(),"",vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task 2"),"Task",COleDateTime(2005,6,27,0,00,00).operator DATE(),COleDateTime(2005,7,4,0,00,00).operator DATE(),"",vtMissing);
	var_Items->StartBlockUndoRedo();
	var_Items->AddLink("L1",var_Items->GetItemByIndex(0),"",var_Items->GetItemByIndex(1),"");
	long u = var_Items->GetStartUpdateLink("L1");
	var_Items->PutLink("L1",EXG2ANTTLib::exLinkWidth,long(2));
	var_Items->PutLink("L1",EXG2ANTTLib::exLinkText,"<fgcolor FF0000>CTRL+Z (undo), CTRL+Y (redo)");
	var_Items->PutLink("L1",EXG2ANTTLib::exLinkToolTip,"Press CTRL+Z to undo <br> and then press CTRL+Y to redo");
	var_Items->PutLink("L1",EXG2ANTTLib::exLinkStartPos,long(0));
	var_Items->PutLink("L1",EXG2ANTTLib::exLinkColor,long(255));
	var_Items->EndUpdateLink(u);
	var_Items->EndBlockUndoRedo();
spG2antt1->EndUpdate();

2165
I am using the ItemBar property to customize the task, but when I press redo it (CTRL+Y) to redo it, not all properties are restored. What can be done

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetColumns()->Add(L"Tasks");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutAllowUndoRedo(VARIANT_TRUE);
	var_Chart->PutFirstVisibleDate(COleDateTime(2005,6,20,0,00,00).operator DATE());
	var_Chart->PutAllowLinkBars(VARIANT_TRUE);
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,64);
	var_Chart->GetBars()->GetItem("Task")->PutHeight(16);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddBar(var_Items->AddItem("Task 1"),"Task",COleDateTime(2005,6,21,0,00,00).operator DATE(),COleDateTime(2005,6,30,0,00,00).operator DATE(),"",vtMissing);
	long h = var_Items->AddItem("Task 2");
	var_Items->StartBlockUndoRedo();
	var_Items->AddBar(h,"Task",COleDateTime(2005,6,27,0,00,00).operator DATE(),COleDateTime(2005,7,4,0,00,00).operator DATE(),"","CTRL+Z (undo), CTRL+Y (redo)");
	long u = var_Items->GetStartUpdateBar(h,"");
	var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarColor,long(255));
	var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarToolTip,"Press CTRL+Z to undo <br> and then press CTRL+Y to redo");
	var_Items->EndUpdateBar(u);
	var_Items->EndBlockUndoRedo();
spG2antt1->EndUpdate();

2164
The incremental search feature is no working for columns with editor assigned. What can be done

// DblClick event - Occurs when the user dblclk the left mouse button over an object.
void OnDblClickG2antt1(short   Shift,long   X,long   Y)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
		#import <ExG2antt.dll>
		using namespace EXG2ANTTLib;
	*/
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	spG2antt1->Edit(vtMissing);
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetChart()->PutPaneWidth(VARIANT_TRUE,0);
spG2antt1->PutHeaderAppearance(EXG2ANTTLib::Etched);
spG2antt1->PutAutoEdit(VARIANT_FALSE);
spG2antt1->PutAutoSearch(VARIANT_TRUE);
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Contains")));
	var_Column->PutAutoSearch(EXG2ANTTLib::exContains);
	var_Column->GetEditor()->PutEditType(EXG2ANTTLib::EditType);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddItem("Tom Hanks");
	var_Items->AddItem("Leonardo DiCaprio");
	var_Items->AddItem("Will Smith");
	var_Items->AddItem("Tom Cruise");
spG2antt1->EndUpdate();

2163
Each item is representated by a key as string. Is it possible to have a drop down editor to display more information when using the item's key

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetChart()->PutPaneWidth(VARIANT_TRUE,0);
spG2antt1->PutHeaderAppearance(EXG2ANTTLib::Etched);
EXG2ANTTLib::IEditorPtr var_Editor = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Multiple-Columns Tree DropDownListType")))->GetEditor();
	var_Editor->PutEditType(EXG2ANTTLib::DropDownListType);
	var_Editor->AddItem(0,L"KR|Korea, Republic of",vtMissing);
	var_Editor->AddItem(1,L"MO|Macao",vtMissing);
	var_Editor->AddItem(2,L"SA|Saudi Arabia",vtMissing);
	var_Editor->AddItem(3,L"EG|Egypt",vtMissing);
	var_Editor->AddItem(4,L"GB|United Kingdom",vtMissing);
	var_Editor->AddItem(5,L"GT|Guatemala",vtMissing);
	var_Editor->AddItem(6,L"SR|Suriname",vtMissing);
	var_Editor->AddItem(7,L"BM|Bermuda",vtMissing);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddItem("EG");
	var_Items->AddItem("GB");
	var_Items->AddItem("BM");
spG2antt1->EndUpdate();

2162
My table includes codes/keys for items, can I display a drop down editor to include more information

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetChart()->PutPaneWidth(VARIANT_TRUE,0);
spG2antt1->PutHeaderAppearance(EXG2ANTTLib::Etched);
EXG2ANTTLib::IEditorPtr var_Editor = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Multiple-Columns DropDownListType")))->GetEditor();
	var_Editor->PutEditType(EXG2ANTTLib::DropDownListType);
	var_Editor->PutDropDownAutoWidth(EXG2ANTTLib::exDropDownEditorWidth);
	var_Editor->PutOption(EXG2ANTTLib::exDropDownColumnCaption,"City¦Coordinates¦State");
	var_Editor->AddItem(0,L"JV3|Jollyville¦3026N 09746W¦Texas",vtMissing);
	var_Editor->AddItem(1,L"TMO|Altamont¦4021N 11017W¦Utah",vtMissing);
	var_Editor->AddItem(2,L"IIM|Williamston¦4241N 08417W¦Michigan",vtMissing);
	var_Editor->AddItem(3,L"IWN|Merrittstown¦3958N 07952W¦Pennsylvania",vtMissing);
	var_Editor->AddItem(4,L"HOU|Houston¦2945N 09521W¦Texas",vtMissing);
	var_Editor->AddItem(5,L"GSF|Gales Ferry¦4125N 07205W¦Connecticut",vtMissing);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddItem("HOU");
	var_Items->AddItem("IIM");
	var_Items->AddItem("TMO");
spG2antt1->EndUpdate();

2161
How can I display and select from a multiple-columns tree editor

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetChart()->PutPaneWidth(VARIANT_TRUE,0);
spG2antt1->Images(_bstr_t("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTq") +
"lVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m" +
"0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/y" +
"NAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=");
spG2antt1->PutHeaderAppearance(EXG2ANTTLib::Etched);
EXG2ANTTLib::IEditorPtr var_Editor = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Multiple-Columns Tree DropDownListType")))->GetEditor();
	var_Editor->PutEditType(EXG2ANTTLib::DropDownListType);
	var_Editor->PutDropDownAutoWidth(EXG2ANTTLib::exDropDownEditorWidth);
	var_Editor->PutOption(EXG2ANTTLib::exDropDownColumnCaption,"Name¦Title¦City¦Phone");
	var_Editor->PutOption(EXG2ANTTLib::exDropDownColumnWidth,"224¦¦¦96");
	var_Editor->AddItem(1,L"Nancy Davolio¦Sales Representative¦Seattle¦(206) 555-9857",long(1));
	var_Editor->AddItem(2,L"Andrew Fuller¦<b>Vice President</b>, Sales¦Tacoma¦(206) 555-9482",long(2));
	var_Editor->InsertItem(3,L"Janet Leverling¦Sales Representative¦Kirkland¦(206) 555-3412",long(3),long(2));
	var_Editor->InsertItem(4,L"Peacock Margaret¦Sales Representative¦Redmond¦(206) 555-8122",long(3),long(2));
	var_Editor->InsertItem(5,L"Steven Buchanan¦Sales Manager¦London¦(71) 555-4848",long(2),long(2));
	var_Editor->InsertItem(6,L"Michael Suyama¦Sales Representative¦London¦(71) 555-7773",long(1),long(5));
	var_Editor->InsertItem(7,L"Robert King¦Sales Representative¦Kirkland¦(71) 555-5598",long(2),long(2));
	var_Editor->InsertItem(8,L"Laura Callahan¦Inside Sales Coordinator¦Seattle¦(206) 555-1189",long(3),long(2));
	var_Editor->InsertItem(9,L"Anne Dodsworth¦Sales Representative¦London¦(71) 555-4444",long(2),long(5));
	var_Editor->ExpandAll();
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddItem(long(1));
	var_Items->AddItem(long(2));
	var_Items->AddItem(long(4));
spG2antt1->EndUpdate();

2160
Does you control support multiple-columns for a drop down editor

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetChart()->PutPaneWidth(VARIANT_TRUE,0);
spG2antt1->PutHeaderAppearance(EXG2ANTTLib::Etched);
EXG2ANTTLib::IEditorPtr var_Editor = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Multiple-Columns DropDownListType")))->GetEditor();
	var_Editor->PutEditType(EXG2ANTTLib::DropDownListType);
	var_Editor->PutDropDownAutoWidth(EXG2ANTTLib::exDropDownEditorWidth);
	var_Editor->AddItem(0,L"Jollyville¦JV3¦3026N 09746W¦TX",vtMissing);
	var_Editor->AddItem(1,L"Altamont¦TMO¦4021N 11017W¦UT",vtMissing);
	var_Editor->AddItem(2,L"Williamston¦IIM¦4241N 08417W¦MI",vtMissing);
	var_Editor->AddItem(3,L"Merrittstown¦IWN¦3958N 07952W¦PA",vtMissing);
	var_Editor->AddItem(4,L"Houston¦HOU¦2945N 09521W¦TX",vtMissing);
	var_Editor->AddItem(5,L"Gales Ferry¦GSF¦4125N 07205W¦CT",vtMissing);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->InsertItem(0,"",long(1));
	var_Items->InsertItem(0,"",long(2));
	var_Items->InsertItem(0,"",long(4));
spG2antt1->EndUpdate();

2159
Is it possible to change the summary-bar's start or/and end margins

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutHeaderAppearance(EXG2ANTTLib::Etched);
spG2antt1->PutLinesAtRoot(EXG2ANTTLib::exGroupLinesOutside);
spG2antt1->PutColumnAutoResize(VARIANT_FALSE);
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutAllowCreateBar(EXG2ANTTLib::exNoCreateBar);
	var_Chart->PutAllowLinkBars(VARIANT_FALSE);
	var_Chart->PutFirstVisibleDate(COleDateTime(2008,1,1,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,256);
((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Members")))->PutWidth(96);
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Start")));
	var_Column->PutWidth(112);
	var_Column->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(1));
	var_Column->PutLevelKey(long(1));
EXG2ANTTLib::IColumnPtr var_Column1 = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"End")));
	var_Column1->PutWidth(112);
	var_Column1->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(2));
	var_Column1->PutLevelKey(long(1));
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->PutAllowCellValueToItemBar(VARIANT_TRUE);
	long hR1 = var_Items->AddItem("Team");
	var_Items->AddBar(hR1,"Summary",COleDateTime(2008,1,2,0,00,00).operator DATE(),COleDateTime(2008,1,8,0,00,00).operator DATE(),"",vtMissing);
	var_Items->AddBar(hR1,"",COleDateTime(2008,1,13,0,00,00).operator DATE(),COleDateTime(2008,1,13,0,00,00).operator DATE(),"R",vtMissing);
	var_Items->PutItemBar(hR1,"R",EXG2ANTTLib::exBarTransparent,long(100));
	var_Items->DefineSummaryBars(hR1,"",h1,"R");
	long h1 = var_Items->InsertItem(hR1,vtMissing,"Member 1");
	var_Items->AddBar(h1,"Task",COleDateTime(2008,1,2,0,00,00).operator DATE(),COleDateTime(2008,1,7,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->DefineSummaryBars(hR1,"",h1,"");
	h1 = var_Items->InsertItem(hR1,vtMissing,"Member 2");
	var_Items->AddBar(h1,"Task",COleDateTime(2008,1,4,0,00,00).operator DATE(),COleDateTime(2008,1,9,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->DefineSummaryBars(hR1,"",h1,"");
	h1 = var_Items->InsertItem(hR1,vtMissing,"Member 3");
	var_Items->AddBar(h1,"Task",COleDateTime(2008,1,5,0,00,00).operator DATE(),COleDateTime(2008,1,10,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->DefineSummaryBars(hR1,"",h1,"");
	var_Items->PutExpandItem(hR1,VARIANT_TRUE);
spG2antt1->EndUpdate();

2158
I want to display two lines/curves in the histogram-area such as expected and actual work effor per month. How can I do that (leaf)

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutPaneWidth(VARIANT_FALSE,128);
	var_Chart->PutFirstVisibleDate(COleDateTime(2020,10,5,0,00,00).operator DATE());
	var_Chart->PutHistogramVisible(VARIANT_TRUE);
	var_Chart->PutHistogramHeight(96);
	var_Chart->PutHistogramView(EXG2ANTTLib::HistogramViewEnum(EXG2ANTTLib::exHistogramNoGrouping | EXG2ANTTLib::exHistogramRecLeafItems | EXG2ANTTLib::exHistogramLeafItems | EXG2ANTTLib::exHistogramUnlockedItems));
	EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->GetItem("Task");
		var_Bar->PutHistogramPattern(EXG2ANTTLib::exRectangularCurve);
		var_Bar->PutHistogramItems(-4);
		var_Bar->PutHistogramBorderSize(1);
	EXG2ANTTLib::IBarPtr var_Bar1 = var_Chart->GetBars()->Copy(L"Task",L"C");
		var_Bar1->PutHistogramPattern(EXG2ANTTLib::exRectangularCurve);
		var_Bar1->PutHistogramItems(-4);
		var_Bar1->PutHistogramColor(RGB(255,0,0));
		var_Bar1->PutHistogramBorderSize(2);
spG2antt1->GetColumns()->Add(L"Column");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Project A");
	var_Items->AddBar(var_Items->InsertItem(h,vtMissing,"Item 1"),"Task",COleDateTime(2020,10,7,0,00,00).operator DATE(),COleDateTime(2020,10,14,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->InsertItem(h,vtMissing,"Item 2"),"Task",COleDateTime(2020,10,10,0,00,00).operator DATE(),COleDateTime(2020,10,17,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutExpandItem(h,VARIANT_TRUE);
	h = var_Items->AddItem("Project B");
	var_Items->AddBar(var_Items->InsertItem(h,vtMissing,"Item 1"),"C",COleDateTime(2020,10,13,0,00,00).operator DATE(),COleDateTime(2020,10,20,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->InsertItem(h,vtMissing,"Item 2"),"C",COleDateTime(2020,10,15,0,00,00).operator DATE(),COleDateTime(2020,10,23,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutExpandItem(h,VARIANT_TRUE);
spG2antt1->EndUpdate();

2157
I want to display two lines/curves in the histogram-area such as expected and actual work effor per month. How can I do that (flat)

// BarResize event - Occurs when a bar is moved or resized.
void OnBarResizeG2antt1(long   Item,VARIANT   Key)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
		#import <ExG2antt.dll>
		using namespace EXG2ANTTLib;
	*/
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
		var_Items->PutItemBar(Item,Key,EXG2ANTTLib::exBarEffort,var_Items->GetItemBar(Item,Key,EXG2ANTTLib::exBarPercent));
		var_Items->PutItemBar(Item,"C",EXG2ANTTLib::exBarEffort,long(1));
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutHeaderVisible(EXG2ANTTLib::exHeaderVisibleExtendLevels);
spG2antt1->PutHeaderAppearance(EXG2ANTTLib::Etched);
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2020,10,5,0,00,00).operator DATE());
	var_Chart->PutPaneWidth(VARIANT_FALSE,128);
	var_Chart->PutLevelCount(2);
	var_Chart->PutHistogramHeight(96);
	var_Chart->PutHistogramVisible(VARIANT_TRUE);
	EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->Add(L"Task%Progress");
		var_Bar->PutHistogramPattern(EXG2ANTTLib::exRectangularCurve);
		var_Bar->PutHistogramItems(-4);
		var_Bar->PutHistogramBorderSize(1);
		var_Bar->PutHistogramBorderColor(var_Bar->GetColor());
		var_Bar->PutShortcut(L"P");
		var_Bar->PutDef(EXG2ANTTLib::exBarShowPercentCaption,VARIANT_TRUE);
	EXG2ANTTLib::IBarPtr var_Bar1 = var_Chart->GetBars()->Copy(L"Task",L"C");
		var_Bar1->PutHistogramPattern(EXG2ANTTLib::exRectangularCurve);
		var_Bar1->PutHistogramColor(RGB(255,0,0));
		var_Bar1->PutHistogramBorderSize(2);
((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Tasks")))->PutFormatColumn(L"`Task ` + (1 index ``)");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem(vtMissing);
	var_Items->AddBar(h,"P",COleDateTime(2020,10,7,0,00,00).operator DATE(),COleDateTime(2020,10,14,0,00,00).operator DATE(),"P",vtMissing);
	var_Items->PutItemBar(h,"P",EXG2ANTTLib::exBarPercent,double(0.5));
	var_Items->AddBar(h,"C",COleDateTime(2020,10,7,0,00,00).operator DATE(),COleDateTime(2020,10,14,0,00,00).operator DATE(),"C",vtMissing);
	var_Items->PutItemBar(h,"C",EXG2ANTTLib::exBarTransparent,long(100));
	var_Items->GroupBars(h,"P",VARIANT_TRUE,h,"C",VARIANT_TRUE,vtMissing,vtMissing);
	var_Items->GroupBars(h,"P",VARIANT_FALSE,h,"C",VARIANT_FALSE,vtMissing,vtMissing);
	h = var_Items->AddItem(vtMissing);
	var_Items->AddBar(h,"P",COleDateTime(2020,10,10,0,00,00).operator DATE(),COleDateTime(2020,10,17,0,00,00).operator DATE(),"P",vtMissing);
	var_Items->PutItemBar(h,"P",EXG2ANTTLib::exBarPercent,double(0.75));
	var_Items->AddBar(h,"C",COleDateTime(2020,10,10,0,00,00).operator DATE(),COleDateTime(2020,10,17,0,00,00).operator DATE(),"C",vtMissing);
	var_Items->PutItemBar(h,"C",EXG2ANTTLib::exBarTransparent,long(100));
	var_Items->GroupBars(h,"P",VARIANT_TRUE,h,"C",VARIANT_TRUE,vtMissing,vtMissing);
	var_Items->GroupBars(h,"P",VARIANT_FALSE,h,"C",VARIANT_FALSE,vtMissing,vtMissing);
	h = var_Items->AddItem(vtMissing);
	var_Items->AddBar(h,"P",COleDateTime(2020,10,13,0,00,00).operator DATE(),COleDateTime(2020,10,20,0,00,00).operator DATE(),"P",vtMissing);
	var_Items->PutItemBar(h,"P",EXG2ANTTLib::exBarPercent,double(0.25));
	var_Items->AddBar(h,"C",COleDateTime(2020,10,13,0,00,00).operator DATE(),COleDateTime(2020,10,20,0,00,00).operator DATE(),"C",vtMissing);
	var_Items->PutItemBar(h,"C",EXG2ANTTLib::exBarTransparent,long(100));
	var_Items->GroupBars(h,"P",VARIANT_TRUE,h,"C",VARIANT_TRUE,vtMissing,vtMissing);
	var_Items->GroupBars(h,"P",VARIANT_FALSE,h,"C",VARIANT_FALSE,vtMissing,vtMissing);
spG2antt1->EndUpdate();

2156
Is it possible to show the filterbar on top of the rows

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutFilterBarPromptVisible(EXG2ANTTLib::exFilterBarTop);
spG2antt1->PutHeaderHeight(24);
spG2antt1->PutFilterBarHeight(spG2antt1->GetHeaderHeight());
spG2antt1->PutHeaderAppearance(EXG2ANTTLib::Flat);
spG2antt1->PutDrawGridLines(EXG2ANTTLib::exAllLines);
spG2antt1->PutGridLineStyle(EXG2ANTTLib::exGridLinesGeometric);
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Column")));
	var_Column->PutDisplayFilterButton(VARIANT_TRUE);
	var_Column->PutFilterType(EXG2ANTTLib::exPattern);
	var_Column->PutFilter(L"B*");
EXG2ANTTLib::IColumnPtr var_Column1 = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Index")));
	var_Column1->PutFormatColumn(L"1 index ``");
	var_Column1->PutPosition(0);
	var_Column1->PutWidth(48);
	var_Column1->PutAllowSizing(VARIANT_FALSE);
	var_Column1->PutSortType(EXG2ANTTLib::SortNumeric);
	var_Column1->PutDef(EXG2ANTTLib::exCellHasCheckBox,VARIANT_TRUE);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddItem("A.1");
	var_Items->AddItem("A.2");
	var_Items->AddItem("B.1");
	var_Items->AddItem("B.2");
	var_Items->AddItem("B.3");
	var_Items->AddItem("C");
spG2antt1->ApplyFilter();
spG2antt1->EndUpdate();

2155
The deadline symbol is now a white arrow and it is difficult to see. I want to create a green or black arrow for showing deadline

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetColumns()->Add(L"Task");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
	var_Chart->PutPaneWidth(VARIANT_FALSE,96);
	EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->GetItem("Deadline");
		var_Bar->PutStartColor(RGB(0,128,0));
		var_Bar->PutStartShape(EXG2ANTTLib::exShapeIconDown3);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddBar(var_Items->AddItem("Task"),"Deadline",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,2,0,00,00).operator DATE(),vtMissing,vtMissing);
spG2antt1->EndUpdate();

2154
DragDrop (with visual effect)

// OLEDragDrop event - Occurs when a source component is dropped onto a target component when the source component determines that a drop can occur.
void OnOLEDragDropG2antt1(LPDISPATCH   Data,long FAR*   Effect,short   Button,short   Shift,long   X,long   Y)
{
	// SelectItem(InsertItem(i,, Data.GetData(1))) = True
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
		#import <ExG2antt.dll>
		using namespace EXG2ANTTLib;
	*/
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	long i = spG2antt1->GetItemFromPoint(-1,-1,c,hit);
	EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
		var_Items->PutExpandItem(i,VARIANT_TRUE);
}

// OLEStartDrag event - Occurs when the OLEDrag method is called.
void OnOLEStartDragG2antt1(LPDISPATCH   Data,long FAR*   AllowedEffects)
{
	// Data.SetData(Me.Items.CellCaption(FocusItem, 0), 1)
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	AllowedEffects = 1;
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->GetVisualAppearance()->Add(1,_bstr_t("gBFLBCJwBAEHhEJAAEhABPUIQAAYAQGKIcBiAKBQAGaAoDgYN4MAANAwjJBMKgBBCLIxhEYobgmGIaRjEEQDCKYcxHCaIBiGcaIfDEBIeSBHcgRbAcOQHGSZZBhGRJG") +
"juKIbSrLICzBDUcRnGwAKQoaaaEomHwyAZOYwDAIoWhpKKCKjqWJKNb+XgAAJTES0RRVRTNAZ1YghGAQgIA==");
spG2antt1->PutBackground(EXG2ANTTLib::exListOLEDropPosition,0x1000000);
spG2antt1->PutBackground(EXG2ANTTLib::exChartOLEDropPosition,RGB(1,0,0));
spG2antt1->PutBackground(EXG2ANTTLib::exDragDropBefore,RGB(0,0,0));
spG2antt1->PutBackground(EXG2ANTTLib::exDragDropAfter,RGB(255,255,255));
spG2antt1->PutOLEDropMode(EXG2ANTTLib::exOLEDropManual);
spG2antt1->PutAutoDrag(EXG2ANTTLib::exAutoDragPositionAnyOnRight);
spG2antt1->PutLinesAtRoot(EXG2ANTTLib::exLinesAtRoot);
spG2antt1->PutIndent(16);
spG2antt1->PutSelBackMode(EXG2ANTTLib::exTransparent);
spG2antt1->GetColumns()->Add(L"Default");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Root");
	var_Items->InsertItem(h,vtMissing,"Child 1");
	var_Items->InsertItem(h,vtMissing,"Child 2");
	var_Items->PutExpandItem(h,VARIANT_TRUE);
OutputDebugStringW( L"You can:" );
OutputDebugStringW( L"A) left-click to drag and drop items between controls (open a new exhelper and run the same sample)" );
OutputDebugStringW( L"B) right-click to re-arrange the item position inside the same control" );
OutputDebugStringW( L"This sample shows how you can insert the data being dropped as a child of the item being hovered." );

2153
DragDrop (with no visual effect, hide item while drag and drop)

// OLEDragDrop event - Occurs when a source component is dropped onto a target component when the source component determines that a drop can occur.
void OnOLEDragDropG2antt1(LPDISPATCH   Data,long FAR*   Effect,short   Button,short   Shift,long   X,long   Y)
{
	// SelectItem(InsertItem(i,, Data.GetData(1))) = True
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
		#import <ExG2antt.dll>
		using namespace EXG2ANTTLib;
	*/
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	long i = spG2antt1->GetItemFromPoint(-1,-1,c,hit);
	EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
		var_Items->PutExpandItem(i,VARIANT_TRUE);
}

// OLEStartDrag event - Occurs when the OLEDrag method is called.
void OnOLEStartDragG2antt1(LPDISPATCH   Data,long FAR*   AllowedEffects)
{
	// Data.SetData(Me.Items.CellCaption(FocusItem, 0), 1)
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	AllowedEffects = 1;
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->PutBackground(EXG2ANTTLib::exDragDropBefore,RGB(0,0,0));
spG2antt1->PutBackground(EXG2ANTTLib::exDragDropAfter,RGB(255,255,255));
spG2antt1->PutOLEDropMode(EXG2ANTTLib::exOLEDropManual);
spG2antt1->PutAutoDrag(EXG2ANTTLib::exAutoDragPositionAnyOnRight);
spG2antt1->PutLinesAtRoot(EXG2ANTTLib::exLinesAtRoot);
spG2antt1->PutIndent(16);
spG2antt1->PutSelBackMode(EXG2ANTTLib::exTransparent);
spG2antt1->GetColumns()->Add(L"Default");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Root");
	var_Items->InsertItem(h,vtMissing,"Child 1");
	var_Items->InsertItem(h,vtMissing,"Child 2");
	var_Items->PutExpandItem(h,VARIANT_TRUE);
OutputDebugStringW( L"You can:" );
OutputDebugStringW( L"A) left-click to drag and drop items between controls (open a new exhelper and run the same sample)" );
OutputDebugStringW( L"B) right-click to re-arrange the item position inside the same control" );
OutputDebugStringW( L"This sample shows how you can insert the data being dropped as a child of the item being hovered." );

2152
DragDrop

// OLEDragDrop event - Occurs when a source component is dropped onto a target component when the source component determines that a drop can occur.
void OnOLEDragDropG2antt1(LPDISPATCH   Data,long FAR*   Effect,short   Button,short   Shift,long   X,long   Y)
{
	// SelectItem(InsertItem(i,, Data.GetData(1))) = True
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
		#import <ExG2antt.dll>
		using namespace EXG2ANTTLib;
	*/
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	long i = spG2antt1->GetItemFromPoint(-1,-1,c,hit);
	EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
		var_Items->PutExpandItem(i,VARIANT_TRUE);
}

// OLEStartDrag event - Occurs when the OLEDrag method is called.
void OnOLEStartDragG2antt1(LPDISPATCH   Data,long FAR*   AllowedEffects)
{
	// Data.SetData(Me.Items.CellCaption(FocusItem, 0), 1)
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	AllowedEffects = 1;
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->PutOLEDropMode(EXG2ANTTLib::exOLEDropManual);
spG2antt1->PutAutoDrag(EXG2ANTTLib::exAutoDragPositionAnyOnRight);
spG2antt1->PutLinesAtRoot(EXG2ANTTLib::exLinesAtRoot);
spG2antt1->PutIndent(16);
spG2antt1->PutSelBackMode(EXG2ANTTLib::exTransparent);
spG2antt1->GetColumns()->Add(L"Default");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Root");
	var_Items->InsertItem(h,vtMissing,"Child 1");
	var_Items->InsertItem(h,vtMissing,"Child 2");
	var_Items->PutExpandItem(h,VARIANT_TRUE);
OutputDebugStringW( L"You can:" );
OutputDebugStringW( L"A) left-click to drag and drop items between controls (open a new exhelper and run the same sample)" );
OutputDebugStringW( L"B) right-click to re-arrange the item position inside the same control" );
OutputDebugStringW( L"This sample shows how you can insert the data being dropped as a child of the item being hovered." );

2151
Is there anyway to stop the header changing colour when the mouse hovers/moves across the column header (non-clickable)

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutHeaderAppearance(EXG2ANTTLib::Etched);
EXG2ANTTLib::IColumnsPtr var_Columns = spG2antt1->GetColumns();
	var_Columns->Add(L"Item");
	EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Pos")));
		var_Column->PutPosition(0);
		var_Column->PutWidth(32);
		var_Column->PutAllowSizing(VARIANT_FALSE);
		var_Column->PutFormatColumn(L"1 index ``");
		var_Column->PutAllowSort(VARIANT_FALSE);
		var_Column->PutAllowDragging(VARIANT_FALSE);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddItem("Item A");
	var_Items->AddItem("Item B");
	var_Items->AddItem("Item C");
spG2antt1->EndUpdate();

2150
Is there anyway to stop the header changing colour when the mouse hovers/moves across the column header

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutHeaderAppearance(EXG2ANTTLib::Etched);
spG2antt1->PutBackground(EXG2ANTTLib::exCursorHoverColumn,-1);
EXG2ANTTLib::IColumnsPtr var_Columns = spG2antt1->GetColumns();
	var_Columns->Add(L"Item");
	EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Pos")));
		var_Column->PutPosition(0);
		var_Column->PutWidth(32);
		var_Column->PutAllowSizing(VARIANT_FALSE);
		var_Column->PutFormatColumn(L"1 index ``");
		var_Column->PutAllowSort(VARIANT_FALSE);
		var_Column->PutAllowDragging(VARIANT_FALSE);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddItem("Item A");
	var_Items->AddItem("Item B");
	var_Items->AddItem("Item C");
spG2antt1->EndUpdate();

2149
How can I detect the last visible item
// SelectionChanged event - Fired after a new item has been selected.
void OnSelectionChangedG2antt1()
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
		#import <ExG2antt.dll>
		using namespace EXG2ANTTLib;
	*/
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
		OutputDebugStringW( _bstr_t(var_Items->GetNextVisibleItem(var_Items->GetFocusItem())) );
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutLinesAtRoot(EXG2ANTTLib::exLinesAtRoot);
spG2antt1->PutAutoDrag(EXG2ANTTLib::exAutoDragPositionAny);
spG2antt1->GetColumns()->Add(L"Column");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->InsertItem(var_Items->AddItem("Item 1"),vtMissing,"Child 1");
	var_Items->AddItem("Item 2");
	var_Items->AddItem("Item 3");
	var_Items->InsertItem(var_Items->AddItem("Item 4"),vtMissing,"Child 4");
	var_Items->AddItem("Item 5");
spG2antt1->EndUpdate();

2148
Is it possible to show the non-working part on the back (behind the item's background)

// CellStateChanged event - Fired after cell's state has been changed.
void OnCellStateChangedG2antt1(long   Item,long   ColIndex)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
		#import <ExG2antt.dll>
		using namespace EXG2ANTTLib;
	*/
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	spG2antt1->Refresh();
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutLinesAtRoot(EXG2ANTTLib::exGroupLinesOutside);
spG2antt1->PutSelBackMode(EXG2ANTTLib::exTransparent);
spG2antt1->PutDefaultItemHeight(22);
spG2antt1->PutGridLineStyle(EXG2ANTTLib::exGridLinesSolid);
spG2antt1->PutDrawGridLines(EXG2ANTTLib::exAllLines);
spG2antt1->PutHeaderVisible(EXG2ANTTLib::exHeaderVisibleExtendLevels);
spG2antt1->PutHeaderAppearance(EXG2ANTTLib::Etched);
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Tasks")));
	var_Column->PutDef(EXG2ANTTLib::exCellHasCheckBox,VARIANT_TRUE);
	var_Column->PutPartialCheck(VARIANT_TRUE);
EXG2ANTTLib::IAppearancePtr var_Appearance = spG2antt1->GetVisualAppearance();
	var_Appearance->Add(2,_bstr_t("gBFLBCJwBAEHhEJAAEhABUkIQAAYAQGKIcBiAKBQAGYBIJDEMQ3DjAUBjMK4ZwTC4AIQjCK4JDKHYJRpHEZgLBMJAAGIZYhhUYRUiYMkiJBGGDIDiGGI2SJAcbTVIEc") +
"x9EyUJSgSTJOjCMokTTIU4TTLYASbJafJJhWSaAiyMouDIOMg1BDNIw/Hika6jOgKUisNJXRzWIBTbDlOQ3JqnbCjOQRSrQBoNDAMAiiaKlbwJPK9RoieQXfwUAJrXJc" +
"FqXFSLVxNBKAQEBA=");
	var_Appearance->Add(4,_bstr_t("gBFLBCJwBAEHhEJAAEhABTcIQAAYAQGKIcBiAKBQAGaAoDgYN4MAANAwjJBMKgBBCLIxhEYobgmGIaRiBMIxAKIZhzEiJYgGIZxYh8MQER5IEbyBDsBw5AaZZojGRJG") +
"igNIqSxLUhTRKUdQrG4AKQnGhpDgmJYnU5EcrSUKQcw/JaiKYpGZYXpqO5OTzUIyVHDdKgFGKNKwjKiKKp6FofDJcADUcKAYBKFoaLjgS5bXhSGpnV5bFoWdLTVwhBKA" +
"QEBA=");
	var_Appearance->Add(1,"CP:2 1 1 -1 -1");
	var_Appearance->Add(3,"CP:4 1 1 -1 -1");
EXG2ANTTLib::IConditionalFormatPtr var_ConditionalFormat = spG2antt1->GetConditionalFormats()->Add(L"%CS0 = 1",vtMissing);
	var_ConditionalFormat->PutBackColor(0x3000000);
	var_ConditionalFormat->PutChartBackColor(var_ConditionalFormat->GetBackColor());
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2017,8,1,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,128);
	var_Chart->GetBars()->GetItem("Task")->PutPattern(EXG2ANTTLib::exPatternSolid);
	EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->GetItem("Summary");
		var_Bar->PutStartShape(EXG2ANTTLib::exShapeIconEmpty);
		var_Bar->PutEndShape(EXG2ANTTLib::exShapeIconEmpty);
		var_Bar->PutShape(EXG2ANTTLib::exShapeSolidDown);
	var_Chart->PutSelBackColor(spG2antt1->GetSelBackColor());
	var_Chart->PutSelBarColor(RGB(128,128,128));
	var_Chart->PutDrawGridLines(EXG2ANTTLib::exAllLines);
	var_Chart->PutNonworkingDaysPattern(EXG2ANTTLib::exPatternSolid);
	var_Chart->PutGridLineStyle(EXG2ANTTLib::GridLinesStyleEnum(EXG2ANTTLib::exGridLinesBehind | EXG2ANTTLib::exGridLinesSolid));
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Project");
	long hChild = var_Items->InsertItem(h,vtMissing,"Task 1");
	var_Items->AddBar(hChild,"Task",COleDateTime(2017,8,2,0,00,00).operator DATE(),COleDateTime(2017,8,8,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutSelectItem(hChild,VARIANT_TRUE);
	hChild = var_Items->InsertItem(h,vtMissing,"Task 2");
	var_Items->AddBar(hChild,"Task",COleDateTime(2017,8,3,0,00,00).operator DATE(),COleDateTime(2017,8,10,0,00,00).operator DATE(),vtMissing,vtMissing);
	hChild = var_Items->InsertItem(h,vtMissing,"Task 3");
	var_Items->AddBar(hChild,"Task",COleDateTime(2017,8,4,0,00,00).operator DATE(),COleDateTime(2017,8,12,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutCellState(hChild,long(0),1);
	hChild = var_Items->InsertItem(h,vtMissing,"Task 4");
	var_Items->AddBar(hChild,"Task",COleDateTime(2017,8,5,0,00,00).operator DATE(),COleDateTime(2017,8,14,0,00,00).operator DATE(),vtMissing,vtMissing);
	hChild = var_Items->InsertItem(h,vtMissing,"Task 5");
	var_Items->AddBar(hChild,"Task",COleDateTime(2017,8,6,0,00,00).operator DATE(),COleDateTime(2017,8,16,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(h,"Summary",COleDateTime(2017,8,1,0,00,00).operator DATE(),COleDateTime(2017,8,1,0,00,00).operator DATE(),"sum",vtMissing);
	var_Items->DefineSummaryBars(h,"sum",-3,"");
	var_Items->PutExpandItem(h,VARIANT_TRUE);
	h = var_Items->AddItem("ItemBackColor");
	var_Items->AddBar(h,"Progress",COleDateTime(2017,8,4,0,00,00).operator DATE(),COleDateTime(2017,8,14,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutItemBackColor(h,0x18080ff);
	spG2antt1->GetChart()->PutItemBackColor(h,0x18080ff);
spG2antt1->EndUpdate();

2147
How can I hide a bar within the control's overview (sample 1)

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetColumns()->Add(L"Default");
spG2antt1->PutBackground(EXG2ANTTLib::exSplitBar,RGB(190,190,190));
spG2antt1->PutBackColorLevelHeader(spG2antt1->GetBackColor());
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,64);
	var_Chart->PutOverviewHeight(48);
	var_Chart->PutOverviewVisible(EXG2ANTTLib::OverviewVisibleEnum(EXG2ANTTLib::exOverviewSplitter | EXG2ANTTLib::exOverviewShowMargins | EXG2ANTTLib::exOverviewShowAllVisible));
	var_Chart->PutFirstVisibleDate(COleDateTime(2020,1,1,0,00,00).operator DATE());
	var_Chart->GetBars()->Copy(L"Task",L"TaskO")->PutColor(RGB(255,0,0));
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddItem("");
	long h = var_Items->AddItem("");
	var_Items->AddBar(h,"Task",COleDateTime(2020,1,2,0,00,00).operator DATE(),COleDateTime(2020,1,12,0,00,00).operator DATE(),"K1",vtMissing);
	var_Items->AddBar(h,"Task",COleDateTime(2020,12,2,0,00,00).operator DATE(),COleDateTime(2020,12,12,0,00,00).operator DATE(),"K2",vtMissing);
	h = var_Items->AddItem("");
	var_Items->AddBar(h,"TaskO",COleDateTime(2020,1,2,0,00,00).operator DATE(),COleDateTime(2020,1,12,0,00,00).operator DATE(),"K1",vtMissing);
	var_Items->PutItemBar(h,"K1",EXG2ANTTLib::exBarOverviewColor,long(-1));
	var_Items->AddBar(h,"TaskO",COleDateTime(2020,12,2,0,00,00).operator DATE(),COleDateTime(2020,12,12,0,00,00).operator DATE(),"K2",vtMissing);
	var_Items->PutItemBar(h,"K2",EXG2ANTTLib::exBarOverviewColor,long(-1));
	h = var_Items->AddItem("");
	var_Items->AddBar(h,"Task",COleDateTime(2020,1,2,0,00,00).operator DATE(),COleDateTime(2020,1,12,0,00,00).operator DATE(),"K1",vtMissing);
	var_Items->AddBar(h,"Task",COleDateTime(2020,12,2,0,00,00).operator DATE(),COleDateTime(2020,12,12,0,00,00).operator DATE(),"K2",vtMissing);
spG2antt1->EndUpdate();

2146
How can I hide all bars within the control's overview (sample 2)

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetColumns()->Add(L"Default");
spG2antt1->PutBackground(EXG2ANTTLib::exSplitBar,RGB(190,190,190));
spG2antt1->PutBackColorLevelHeader(spG2antt1->GetBackColor());
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,64);
	var_Chart->PutOverviewHeight(48);
	var_Chart->PutOverviewVisible(EXG2ANTTLib::OverviewVisibleEnum(EXG2ANTTLib::exOverviewShowMargins | EXG2ANTTLib::exOverviewHideBars | EXG2ANTTLib::exOverviewShowOnlyVisible));
	var_Chart->PutFirstVisibleDate(COleDateTime(2020,1,1,0,00,00).operator DATE());
	EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->Copy(L"Task",L"TaskO");
		var_Bar->PutOverviewColor(-1);
		var_Bar->PutColor(RGB(255,0,0));
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddItem("");
	long h = var_Items->AddItem("");
	var_Items->AddBar(h,"Task",COleDateTime(2020,1,2,0,00,00).operator DATE(),COleDateTime(2020,1,12,0,00,00).operator DATE(),"K1",vtMissing);
	var_Items->AddBar(h,"Task",COleDateTime(2020,12,2,0,00,00).operator DATE(),COleDateTime(2020,12,12,0,00,00).operator DATE(),"K2",vtMissing);
	h = var_Items->AddItem("");
	var_Items->AddBar(h,"TaskO",COleDateTime(2020,1,2,0,00,00).operator DATE(),COleDateTime(2020,1,12,0,00,00).operator DATE(),"K1",vtMissing);
	var_Items->AddBar(h,"TaskO",COleDateTime(2020,12,2,0,00,00).operator DATE(),COleDateTime(2020,12,12,0,00,00).operator DATE(),"K2",vtMissing);
	h = var_Items->AddItem("");
	var_Items->AddBar(h,"Task",COleDateTime(2020,1,2,0,00,00).operator DATE(),COleDateTime(2020,1,12,0,00,00).operator DATE(),"K1",vtMissing);
	var_Items->AddBar(h,"Task",COleDateTime(2020,12,2,0,00,00).operator DATE(),COleDateTime(2020,12,12,0,00,00).operator DATE(),"K2",vtMissing);
spG2antt1->EndUpdate();

2145
How can I hide all bars or specified type within the control's overview (sample 3)

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetColumns()->Add(L"Default");
spG2antt1->PutBackground(EXG2ANTTLib::exSplitBar,RGB(190,190,190));
spG2antt1->PutBackColorLevelHeader(spG2antt1->GetBackColor());
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,64);
	var_Chart->PutOverviewHeight(48);
	var_Chart->PutOverviewVisible(EXG2ANTTLib::OverviewVisibleEnum(EXG2ANTTLib::exOverviewSplitter | EXG2ANTTLib::exOverviewShowMargins | EXG2ANTTLib::exOverviewShowAllVisible));
	var_Chart->PutFirstVisibleDate(COleDateTime(2020,1,1,0,00,00).operator DATE());
	EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->Copy(L"Task",L"TaskO");
		var_Bar->PutOverviewColor(-1);
		var_Bar->PutColor(RGB(255,0,0));
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddItem("");
	long h = var_Items->AddItem("");
	var_Items->AddBar(h,"Task",COleDateTime(2020,1,2,0,00,00).operator DATE(),COleDateTime(2020,1,12,0,00,00).operator DATE(),"K1",vtMissing);
	var_Items->AddBar(h,"Task",COleDateTime(2020,12,2,0,00,00).operator DATE(),COleDateTime(2020,12,12,0,00,00).operator DATE(),"K2",vtMissing);
	h = var_Items->AddItem("");
	var_Items->AddBar(h,"TaskO",COleDateTime(2020,1,2,0,00,00).operator DATE(),COleDateTime(2020,1,12,0,00,00).operator DATE(),"K1",vtMissing);
	var_Items->AddBar(h,"TaskO",COleDateTime(2020,12,2,0,00,00).operator DATE(),COleDateTime(2020,12,12,0,00,00).operator DATE(),"K2",vtMissing);
	h = var_Items->AddItem("");
	var_Items->AddBar(h,"Task",COleDateTime(2020,1,2,0,00,00).operator DATE(),COleDateTime(2020,1,12,0,00,00).operator DATE(),"K1",vtMissing);
	var_Items->AddBar(h,"Task",COleDateTime(2020,12,2,0,00,00).operator DATE(),COleDateTime(2020,12,12,0,00,00).operator DATE(),"K2",vtMissing);
spG2antt1->EndUpdate();

2144
Is it possible to exclude the parent/child items when do the filtering, so to include only items that match the filter without any indentation

// AddItem event - Occurs after a new Item has been inserted to Items collection.
void OnAddItemG2antt1(long   Item)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
		#import <ExG2antt.dll>
		using namespace EXG2ANTTLib;
	*/
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	spG2antt1->GetItems()->AddBar(Item,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,9,0,00,00).operator DATE(),vtMissing,vtMissing);
}

// FilterChange event - Occurs when the filter was changed.
void OnFilterChangeG2antt1()
{
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	spG2antt1->PutIndent(spG2antt1->FormatABC(L"value > 0 ? 18 : 0",->GetItems()->GetMatchItemCount(),vtMissing,vtMissing));
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutLinesAtRoot(EXG2ANTTLib::exLinesAtRoot);
spG2antt1->PutIndent(18);
spG2antt1->PutFilterInclude(EXG2ANTTLib::exMatchingItemsOnly);
spG2antt1->PutDrawGridLines(EXG2ANTTLib::exVLines);
spG2antt1->PutHeaderAppearance(EXG2ANTTLib::Flat);
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutLevelCount(2);
	var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
	var_Chart->PutPaneWidth(VARIANT_FALSE,164);
EXG2ANTTLib::IColumnsPtr var_Columns = spG2antt1->GetColumns();
	EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Column")));
		var_Column->PutDisplayFilterButton(VARIANT_TRUE);
		var_Column->PutFilterType(EXG2ANTTLib::exFilter);
		var_Column->PutFilterList(EXG2ANTTLib::exShowCheckBox);
		var_Column->PutFilter(L"C1");
	EXG2ANTTLib::IColumnPtr var_Column1 = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Pos")));
		var_Column1->PutFormatColumn(L"1 rindex ``");
		var_Column1->PutPosition(0);
		var_Column1->PutAllowSizing(VARIANT_FALSE);
		var_Column1->PutAllowDragging(VARIANT_FALSE);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("R1");
	long h2 = var_Items->InsertItem(h,vtMissing,"S");
	var_Items->InsertItem(h2,vtMissing,"C1");
	var_Items->InsertItem(h2,vtMissing,"C2");
	var_Items->InsertItem(h,vtMissing,"C1");
	var_Items->InsertItem(h,vtMissing,"C2");
	var_Items->PutExpandItem(h,VARIANT_TRUE);
	h = var_Items->AddItem("R2");
	var_Items->InsertItem(h,vtMissing,"C1");
	var_Items->InsertItem(h,vtMissing,"C2");
spG2antt1->ApplyFilter();
spG2antt1->EndUpdate();

2143
I am using the Chart.AllowResizeChart property. How can I customize the labels into the chart's levels
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetColumns()->Add(L"Task");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutAllowResizeChart(EXG2ANTTLib::ResizeChartEnum(EXG2ANTTLib::exAllowChangeUnitScale | EXG2ANTTLib::exAllowResizeChartMiddle | EXG2ANTTLib::exAllowResizeChartHeader));
	var_Chart->PutLabel(EXG2ANTTLib::exYear,L"year");
	var_Chart->PutLabel(EXG2ANTTLib::exHalfYear,L"");
	var_Chart->PutLabel(EXG2ANTTLib::exQuarterYear,L"");
	var_Chart->PutLabel(EXG2ANTTLib::exMonth,L"month");
	var_Chart->PutLabel(EXG2ANTTLib::exThirdMonth,L"");
	var_Chart->PutLabel(EXG2ANTTLib::exWeek,L"week");
	var_Chart->PutLabel(EXG2ANTTLib::exDay,L"day");
	var_Chart->PutLabel(EXG2ANTTLib::exHour,L"hour");
	var_Chart->PutLabel(EXG2ANTTLib::exMinute,L"");
	var_Chart->PutLabel(EXG2ANTTLib::exSecond,L"");
	var_Chart->PutShowNonworkingDates(VARIANT_FALSE);
	var_Chart->PutLevelCount(2);
	var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
	var_Chart->PutPaneWidth(VARIANT_FALSE,48);
	var_Chart->PutUnitWidth(32);
	var_Chart->PutUnitScale(EXG2ANTTLib::exDay);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddBar(var_Items->AddItem("Task A"),"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),"K1",vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task B"),"Task",COleDateTime(2001,1,6,0,00,00).operator DATE(),COleDateTime(2001,1,10,0,00,00).operator DATE(),"K1",vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task C"),"Task",COleDateTime(2001,1,10,0,00,00).operator DATE(),COleDateTime(2001,1,14,0,00,00).operator DATE(),"K1",vtMissing);
	var_Items->AddBar(var_Items->AddItem(""),"",COleDateTime(2001,1,8,0,00,00).operator DATE(),COleDateTime(2001,1,8,0,00,00).operator DATE(),"Info","Click the <b>middle</b> mouse button and start dragging");
spG2antt1->EndUpdate();

2142
Is it possible to display the header using multiple lines, while chart display multiple levels (sample 2)

// AddColumn event - Fired after a new column has been added.
void OnAddColumnG2antt1(LPDISPATCH   Column)
{
	// Column.Def(52) = 4
	// Column.Def(53) = 4
}

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_TRUE,256);
spG2antt1->PutHeaderVisible(EXG2ANTTLib::exHeaderVisibleExtendLevels);
spG2antt1->PutHeaderAppearance(EXG2ANTTLib::Flat);
EXG2ANTTLib::IColumnsPtr var_Columns = spG2antt1->GetColumns();
	var_Columns->Add(L"Column");
	((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"C1")))->PutHTMLCaption(L"<b>C<off 4>1</b><br>left");
	((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"C2")))->PutHTMLCaption(L"<c><b>C<off 4>2</b><br><c>center");
	((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"C3")))->PutHTMLCaption(L"<r><b>C<off 4>3</b><br><r>right");
spG2antt1->EndUpdate();

2141
Is there any way to control the z-order of a TimeZone

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutPaneWidth(VARIANT_FALSE,0);
	var_Chart->PutUnitWidth(15);
	var_Chart->PutLevelCount(2);
	var_Chart->PutFirstVisibleDate(COleDateTime(2009,12,28,0,00,00).operator DATE());
	var_Chart->MarkTimeZone("Top",COleDateTime(2010,1,1,0,00,00).operator DATE(),COleDateTime(2010,1,5,0,00,00).operator DATE(),long(16711680),"1;;<fgcolor=FFFFFF>Top;1");
	var_Chart->MarkTimeZone("Partial",COleDateTime(2010,1,8,0,00,00).operator DATE(),COleDateTime(2010,1,12,0,00,00).operator DATE(),long(16711680),"50;;<fgcolor=FFFFFF>Partial;1");
	var_Chart->MarkTimeZone("Default",COleDateTime(2010,1,15,0,00,00).operator DATE(),COleDateTime(2010,1,19,0,00,00).operator DATE(),long(16711680),";;<fgcolor=FFFFFF>Default;1");

2140
Is it possible to display the header using multiple lines, while chart display multiple levels (sample 1)

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetChart()->PutLevelCount(2);
spG2antt1->PutHeaderHeight(18);
spG2antt1->PutHeaderSingleLine(VARIANT_FALSE);
spG2antt1->PutHeaderVisible(EXG2ANTTLib::exHeaderVisibleExtendLevels);
((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"This is just a column that should break the header.")))->PutWidth(32);
spG2antt1->GetColumns()->Add(L"This is just another column that should break the header.");
spG2antt1->EndUpdate();

2139
Difference between HistogramValueFromPoint and HistogramValue (sample 2)

// MouseMove event - Occurs when the user moves the mouse.
void OnMouseMoveG2antt1(short   Button,short   Shift,long   X,long   Y)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
		#import <ExG2antt.dll>
		using namespace EXG2ANTTLib;
	*/
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
		Double v1 = var_Chart->GetHistogramValueFromPoint(-1,-1);
		Double v2 = var_Chart->GetHistogramValue(var_Chart->GetDateFromPoint(-1,-1),vtMissing,vtMissing);
		Double vMin = var_Chart->GetHistogramValue("min",vtMissing,vtMissing);
		Double vMax = var_Chart->GetHistogramValue("max",vtMissing,vtMissing);
	_variant_t format = spG2antt1->FormatABC(L"`<b>ValueFromPoint</b>: ` + A + `<br>ValueFromDate: ` + B",v1,v2,vtMissing);
	format = spG2antt1->FormatABC(L"A  + `<br>Min: ` + B + `<br>Max: ` + C",format,vMin,vMax);
	spG2antt1->ShowToolTip(L"format",vtMissing,vtMissing,"16","16");
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetColumns()->Add(L"Tasks");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstWeekDay(EXG2ANTTLib::exMonday);
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,40);
	var_Chart->PutFirstVisibleDate(COleDateTime(2005,6,9,0,00,00).operator DATE());
	var_Chart->PutHistogramVisible(VARIANT_TRUE);
	var_Chart->PutHistogramView(EXG2ANTTLib::HistogramViewEnum(EXG2ANTTLib::exHistogramGroupCumulative | EXG2ANTTLib::exHistogramAllItems));
	var_Chart->PutHistogramHeight(128);
	EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->GetItem("Task");
		var_Bar->PutHistogramPattern(var_Bar->GetPattern());
		var_Bar->PutHistogramType(EXG2ANTTLib::exHistCumulative);
		var_Bar->PutHistogramItems(-6);
		var_Bar->PutHistogramRulerLinesColor(RGB(0,0,1));
		var_Bar->PutHistogramBorderSize(1);
		var_Bar->PutHistogramBorderColor(RGB(0,0,1));
		var_Bar->PutHistogramCumulativeOriginalColorBars(EXG2ANTTLib::exChangeColor);
		var_Bar->PutHistogramCumulativeShowLegend(-1);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddBar(var_Items->AddItem("Task"),"Task",COleDateTime(2005,6,10,0,00,00).operator DATE(),COleDateTime(2005,6,14,0,00,00).operator DATE(),"",vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task"),"Task",COleDateTime(2005,6,11,0,00,00).operator DATE(),COleDateTime(2005,6,15,0,00,00).operator DATE(),"",vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task"),"Task",COleDateTime(2005,6,12,0,00,00).operator DATE(),COleDateTime(2005,6,16,0,00,00).operator DATE(),"",vtMissing);
spG2antt1->EndUpdate();

2138
Difference between HistogramValueFromPoint and HistogramValue (sample 1)

// MouseMove event - Occurs when the user moves the mouse.
void OnMouseMoveG2antt1(short   Button,short   Shift,long   X,long   Y)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
		#import <ExG2antt.dll>
		using namespace EXG2ANTTLib;
	*/
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
		Double v1 = var_Chart->GetHistogramValueFromPoint(-1,-1);
		Double v2 = var_Chart->GetHistogramValue(var_Chart->GetDateFromPoint(-1,-1),vtMissing,vtMissing);
		Double vMin = var_Chart->GetHistogramValue("min",vtMissing,vtMissing);
		Double vMax = var_Chart->GetHistogramValue("max",vtMissing,vtMissing);
	_variant_t format = spG2antt1->FormatABC(L"`<b>ValueFromPoint</b>: ` + A + `<br>ValueFromDate: ` + B",v1,v2,vtMissing);
	format = spG2antt1->FormatABC(L"A  + `<br>Min: ` + B + `<br>Max: ` + C",format,vMin,vMax);
	spG2antt1->ShowToolTip(L"format",vtMissing,vtMissing,"16","16");
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetColumns()->Add(L"Tasks");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstWeekDay(EXG2ANTTLib::exMonday);
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,40);
	var_Chart->PutFirstVisibleDate(COleDateTime(2005,6,9,0,00,00).operator DATE());
	var_Chart->PutHistogramVisible(VARIANT_TRUE);
	var_Chart->PutHistogramView(EXG2ANTTLib::exHistogramAllItems);
	var_Chart->PutHistogramHeight(128);
	EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->GetItem("Task");
		var_Bar->PutHistogramPattern(var_Bar->GetPattern());
		var_Bar->PutHistogramType(EXG2ANTTLib::exHistOverload);
		var_Bar->PutHistogramItems(-6);
		var_Bar->PutHistogramRulerLinesColor(RGB(0,0,1));
		var_Bar->PutHistogramBorderSize(1);
		var_Bar->PutHistogramBorderColor(RGB(0,0,1));
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddBar(var_Items->AddItem("Task"),"Task",COleDateTime(2005,6,10,0,00,00).operator DATE(),COleDateTime(2005,6,14,0,00,00).operator DATE(),"",vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task"),"Task",COleDateTime(2005,6,11,0,00,00).operator DATE(),COleDateTime(2005,6,15,0,00,00).operator DATE(),"",vtMissing);
	var_Items->AddBar(var_Items->AddItem("Task"),"Task",COleDateTime(2005,6,12,0,00,00).operator DATE(),COleDateTime(2005,6,16,0,00,00).operator DATE(),"",vtMissing);
spG2antt1->EndUpdate();

2137
I am using the Inside-Zoom feature, but the inside grid lines are more dashed the dotted

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutUnitScale(EXG2ANTTLib::exDay);
	var_Chart->PutPaneWidth(VARIANT_FALSE,0);
	var_Chart->PutLevelCount(2);
	var_Chart->PutFirstVisibleDate(COleDateTime(2008,1,1,0,00,00).operator DATE());
	EXG2ANTTLib::IInsideZoomFormatPtr var_InsideZoomFormat = var_Chart->GetDefaultInsideZoomFormat();
		var_InsideZoomFormat->PutInsideLabel(L"<%hh%>");
		var_InsideZoomFormat->PutInsideUnit(EXG2ANTTLib::exHour);
		var_InsideZoomFormat->PutInsideCount(8);
		var_InsideZoomFormat->PutGridLineStyle(EXG2ANTTLib::exGridLinesGeometric);
	var_Chart->PutAllowInsideZoom(VARIANT_TRUE);
	EXG2ANTTLib::IInsideZoomsPtr var_InsideZooms = var_Chart->GetInsideZooms();
		var_InsideZooms->Add(COleDateTime(2008,1,4,0,00,00).operator DATE());
	var_Chart->PutDrawGridLines(EXG2ANTTLib::exVLines);
	var_Chart->PutShowNonworkingDates(VARIANT_FALSE);
spG2antt1->EndUpdate();

2136
I am using expressions for exBarEffort, but the histogram does not show correctly the data

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutHeaderVisible(EXG2ANTTLib::exHeaderVisibleExtendLevels);
spG2antt1->PutHeaderAppearance(EXG2ANTTLib::Etched);
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2020,10,5,0,00,00).operator DATE());
	var_Chart->PutPaneWidth(VARIANT_FALSE,128);
	var_Chart->PutLevelCount(2);
	var_Chart->PutHistogramHeight(96);
	var_Chart->PutHistogramVisible(VARIANT_TRUE);
	var_Chart->PutAllowInsideZoom(VARIANT_TRUE);
	var_Chart->PutDrawGridLines(EXG2ANTTLib::exAllLines);
	EXG2ANTTLib::IInsideZoomPtr var_InsideZoom = var_Chart->GetInsideZooms()->Add(COleDateTime(2020,10,7,0,00,00).operator DATE());
		var_InsideZoom->PutWidth(196);
	var_Chart->GetDefaultInsideZoomFormat()->PutGridLineStyle(EXG2ANTTLib::exGridLinesSolid);
	EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->GetItem("Task");
		var_Bar->PutHistogramPattern(var_Bar->GetPattern());
		var_Bar->PutDef(EXG2ANTTLib::exBarCaption,"<%=%0%>");
		var_Bar->PutDef(EXG2ANTTLib::exBarHAlignCaption,long(18));
		var_Bar->PutDef(EXG2ANTTLib::exBarEffort,"(hour(value) > 5 and hour(value) < 18) ? 2 : 0");
	var_Chart->PutHistogramUnitScale(EXG2ANTTLib::exHour);
((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Tasks")))->PutFormatColumn(L"`Task ` + (1 index ``)");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddBar(var_Items->AddItem(""),"Task",COleDateTime(2020,10,7,0,00,00).operator DATE(),COleDateTime(2020,10,12,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem(""),"Task",COleDateTime(2020,10,8,0,00,00).operator DATE(),COleDateTime(2020,10,13,0,00,00).operator DATE(),vtMissing,vtMissing);
spG2antt1->EndUpdate();

2135
How can I specify the z-order of bars to be shown within the chart's histogram

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutHeaderVisible(EXG2ANTTLib::exHeaderVisibleExtendLevels);
spG2antt1->PutHeaderAppearance(EXG2ANTTLib::Etched);
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2020,10,5,0,00,00).operator DATE());
	var_Chart->PutPaneWidth(VARIANT_FALSE,128);
	var_Chart->PutLevelCount(2);
	var_Chart->PutHistogramHeight(96);
	var_Chart->PutHistogramVisible(VARIANT_TRUE);
	EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->Add(L"A");
		var_Bar->PutColor(RGB(0,0,255));
		var_Bar->PutHistogramPattern(EXG2ANTTLib::exPatternSolid);
		var_Bar->PutHistogramItems(-6);
		var_Bar->PutHistogramCumulativeOriginalColorBars(EXG2ANTTLib::exKeepOriginalColor);
		var_Bar->PutDef(EXG2ANTTLib::exBarCaption,"<%=%0%>");
		var_Bar->PutDef(EXG2ANTTLib::exBarHAlignCaption,long(18));
	EXG2ANTTLib::IBarPtr var_Bar1 = var_Chart->GetBars()->Copy(L"A",L"B");
		var_Bar1->PutColor(RGB(0,255,0));
		var_Bar1->PutHistogramCumulativeOriginalColorBars(EXG2ANTTLib::exKeepOriginalColor);
		var_Bar1->PutDef(EXG2ANTTLib::exBarCaption,"<%=%0%>");
		var_Bar1->PutDef(EXG2ANTTLib::exBarHAlignCaption,long(18));
	var_Chart->PutHistogramView(EXG2ANTTLib::HistogramViewEnum(EXG2ANTTLib::exHistogramGroupCumulative | EXG2ANTTLib::exHistogramAllItems));
	var_Chart->PutHistogramZOrder(L"A,B");
((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Tasks")))->PutFormatColumn(L"`Task ` + (1 index ``)");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddBar(var_Items->AddItem(""),"A",COleDateTime(2020,10,7,0,00,00).operator DATE(),COleDateTime(2020,10,12,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem(""),"A",COleDateTime(2020,10,8,0,00,00).operator DATE(),COleDateTime(2020,10,13,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem(""),"B",COleDateTime(2020,10,9,0,00,00).operator DATE(),COleDateTime(2020,10,14,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem(""),"B",COleDateTime(2020,10,10,0,00,00).operator DATE(),COleDateTime(2020,10,15,0,00,00).operator DATE(),vtMissing,vtMissing);
spG2antt1->EndUpdate();

2134
How can I show cumulative histogram for two or more different types of bars

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutHeaderVisible(EXG2ANTTLib::exHeaderVisibleExtendLevels);
spG2antt1->PutHeaderAppearance(EXG2ANTTLib::Etched);
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2020,10,5,0,00,00).operator DATE());
	var_Chart->PutPaneWidth(VARIANT_FALSE,128);
	var_Chart->PutLevelCount(2);
	var_Chart->PutHistogramHeight(96);
	var_Chart->PutHistogramVisible(VARIANT_TRUE);
	EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->Add(L"A");
		var_Bar->PutColor(RGB(0,0,255));
		var_Bar->PutHistogramPattern(EXG2ANTTLib::exPatternSolid);
		var_Bar->PutHistogramItems(-6);
		var_Bar->PutHistogramCumulativeOriginalColorBars(EXG2ANTTLib::exKeepOriginalColor);
		var_Bar->PutDef(EXG2ANTTLib::exBarCaption,"<%=%0%>");
		var_Bar->PutDef(EXG2ANTTLib::exBarHAlignCaption,long(18));
	EXG2ANTTLib::IBarPtr var_Bar1 = var_Chart->GetBars()->Copy(L"A",L"B");
		var_Bar1->PutColor(RGB(0,255,0));
		var_Bar1->PutHistogramCumulativeOriginalColorBars(EXG2ANTTLib::exKeepOriginalColor);
		var_Bar1->PutDef(EXG2ANTTLib::exBarCaption,"<%=%0%>");
		var_Bar1->PutDef(EXG2ANTTLib::exBarHAlignCaption,long(18));
	var_Chart->PutHistogramView(EXG2ANTTLib::HistogramViewEnum(EXG2ANTTLib::exHistogramGroupCumulative | EXG2ANTTLib::exHistogramAllItems));
((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Tasks")))->PutFormatColumn(L"`Task ` + (1 index ``)");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddBar(var_Items->AddItem(""),"A",COleDateTime(2020,10,7,0,00,00).operator DATE(),COleDateTime(2020,10,12,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem(""),"A",COleDateTime(2020,10,8,0,00,00).operator DATE(),COleDateTime(2020,10,13,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem(""),"B",COleDateTime(2020,10,9,0,00,00).operator DATE(),COleDateTime(2020,10,14,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem(""),"B",COleDateTime(2020,10,10,0,00,00).operator DATE(),COleDateTime(2020,10,15,0,00,00).operator DATE(),vtMissing,vtMissing);
spG2antt1->EndUpdate();

2133
I would like to display a solid line between "root" items, and dotted lines (default) between child items. How can I do that

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutLinesAtRoot(EXG2ANTTLib::exLinesAtRoot);
spG2antt1->PutDrawGridLines(EXG2ANTTLib::exHLines);
spG2antt1->PutGridLineStyle(EXG2ANTTLib::exGridLinesGeometric);
spG2antt1->GetVisualAppearance()->Add(1,_bstr_t("gBFLBCJwBAEHhEJAAEhABMsIQAAYAQGKIcBiAKBQAGaAoDgYN4MAANAwjJBMKgBBCLIxhEYobgmGIXRpFMbxAKQahLEiTIgGUYJHgmK4tQLHb7zGAABRDDSOIDnGQJX") +
"haI4JQSMMQDGLAZxVFiPRhAWLpBh+PQATrOdLUfSjVwhBKAQEBA==");
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Default")));
	var_Column->PutDef(EXG2ANTTLib::exCellHasCheckBox,VARIANT_TRUE);
	var_Column->PutPartialCheck(VARIANT_TRUE);
EXG2ANTTLib::IColumnPtr var_Column1 = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Position")));
	var_Column1->PutFormatColumn(L"((1 rindex ``) contains `.`) = 0");
	var_Column1->PutVisible(VARIANT_FALSE);
EXG2ANTTLib::IConditionalFormatPtr var_ConditionalFormat = spG2antt1->GetConditionalFormats()->Add(L"%C1",vtMissing);
	var_ConditionalFormat->PutBackColor(0x1e0e0e0);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Root 1");
	var_Items->InsertItem(h,vtMissing,"Child 1");
	var_Items->InsertItem(h,vtMissing,"Child 2");
	var_Items->InsertItem(h,vtMissing,"Child 3");
	var_Items->PutExpandItem(h,VARIANT_TRUE);
	h = var_Items->AddItem("Root 2");
	var_Items->InsertItem(h,vtMissing,"Child 1");
	var_Items->InsertItem(h,vtMissing,"Child 2");
	h = var_Items->AddItem("Root 3");
	var_Items->InsertItem(h,vtMissing,"Child 1");
	var_Items->InsertItem(h,vtMissing,"Child 2");
spG2antt1->EndUpdate();

2132
I can not center or align the cell's caption and icon, when it displays the hierarchy

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->Images(_bstr_t("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTq") +
"lVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m" +
"0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/y" +
"NAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=");
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Tasks")));
	var_Column->PutDef(EXG2ANTTLib::exCellValueFormat,long(1));
spG2antt1->PutHeaderVisible(EXG2ANTTLib::exHeaderVisibleExtendLevels);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Project");
	long hChild = var_Items->InsertItem(h,vtMissing,"<img>1</img> Task (left)");
	hChild = var_Items->InsertItem(h,vtMissing,"<c><img>2</img> Task (center)");
	hChild = var_Items->InsertItem(h,vtMissing,"<r>Task (right) <img>3</img>");
	var_Items->PutExpandItem(h,VARIANT_TRUE);
spG2antt1->EndUpdate();

2131
How do I mask for float/integer number

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutColumnAutoResize(VARIANT_TRUE);
((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Type")))->PutWidth(32);
spG2antt1->GetColumns()->Add(L"Editor");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Integer");
	var_Items->PutCellValue(h,long(1),"12");
	EXG2ANTTLib::IEditorPtr var_Editor = var_Items->GetCellEditor(h,long(1));
		var_Editor->PutEditType(EXG2ANTTLib::EditType);
		var_Editor->PutNumeric(EXG2ANTTLib::exInteger);
	h = var_Items->AddItem("Integer (mask, group)");
	var_Items->PutCellValue(h,long(1),"10002");
	var_Items->PutFormatCell(h,long(1),L"value format `0||`");
	EXG2ANTTLib::IEditorPtr var_Editor1 = var_Items->GetCellEditor(h,long(1));
		var_Editor1->PutEditType(EXG2ANTTLib::MaskType);
		var_Editor1->PutMask(L";;;float,digits=0,invalid=empty,warning=invalid character");
	h = var_Items->AddItem("Integer (mask, no group)");
	var_Items->PutCellValue(h,long(1),"10002");
	var_Items->PutFormatCell(h,long(1),L"value format `0|0|`");
	EXG2ANTTLib::IEditorPtr var_Editor2 = var_Items->GetCellEditor(h,long(1));
		var_Editor2->PutEditType(EXG2ANTTLib::MaskType);
		var_Editor2->PutMask(L";;;float,digits=0,grouping=,invalid=empty,warning=invalid character");
	h = var_Items->AddItem("Float");
	var_Items->PutCellValue(h,long(1),"+12.34E+2");
	EXG2ANTTLib::IEditorPtr var_Editor3 = var_Items->GetCellEditor(h,long(1));
		var_Editor3->PutEditType(EXG2ANTTLib::EditType);
		var_Editor3->PutNumeric(EXG2ANTTLib::exFloat);
	h = var_Items->AddItem("Float (no signs)");
	var_Items->PutCellValue(h,long(1),"12.34E-2");
	EXG2ANTTLib::IEditorPtr var_Editor4 = var_Items->GetCellEditor(h,long(1));
		var_Editor4->PutEditType(EXG2ANTTLib::EditType);
		var_Editor4->PutNumeric(EXG2ANTTLib::NumericEnum(EXG2ANTTLib::exDisableSigns | EXG2ANTTLib::exFloat));
	h = var_Items->AddItem("Float-Integer");
	var_Items->PutCellValue(h,long(1),"+12.34");
	EXG2ANTTLib::IEditorPtr var_Editor5 = var_Items->GetCellEditor(h,long(1));
		var_Editor5->PutEditType(EXG2ANTTLib::EditType);
		var_Editor5->PutNumeric(EXG2ANTTLib::exFloatInteger);
	h = var_Items->AddItem("Float-Integer (no signs)");
	var_Items->PutCellValue(h,long(1),"12.34");
	EXG2ANTTLib::IEditorPtr var_Editor6 = var_Items->GetCellEditor(h,long(1));
		var_Editor6->PutEditType(EXG2ANTTLib::EditType);
		var_Editor6->PutNumeric(EXG2ANTTLib::NumericEnum(EXG2ANTTLib::exDisableSigns | EXG2ANTTLib::exFloatInteger));
	h = var_Items->AddItem("Float (mask,group)");
	var_Items->PutCellValue(h,long(1),"10002.34");
	var_Items->PutFormatCell(h,long(1),L"value format `2`");
	EXG2ANTTLib::IEditorPtr var_Editor7 = var_Items->GetCellEditor(h,long(1));
		var_Editor7->PutEditType(EXG2ANTTLib::MaskType);
		var_Editor7->PutMask(L";;;float,invalid=empty,warning=invalid character");
	h = var_Items->AddItem("Float (mask, no group)");
	var_Items->PutCellValue(h,long(1),"10002.34");
	var_Items->PutFormatCell(h,long(1),L"value format `2|0|`");
	EXG2ANTTLib::IEditorPtr var_Editor8 = var_Items->GetCellEditor(h,long(1));
		var_Editor8->PutEditType(EXG2ANTTLib::MaskType);
		var_Editor8->PutMask(L";;;float,grouping=,invalid=empty,warning=invalid character");
spG2antt1->EndUpdate();

2130
Is it possible to offset (horizontally) the bar's caption

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetColumns()->Add(L"HOffset");
spG2antt1->PutHeaderAppearance(EXG2ANTTLib::Flat);
spG2antt1->PutScrollBySingleLine(VARIANT_TRUE);
spG2antt1->PutDrawGridLines(EXG2ANTTLib::exRowLines);
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutDrawGridLines(EXG2ANTTLib::exRowLines);
	var_Chart->PutFirstVisibleDate(COleDateTime(2000,12,16,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,128);
	EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->GetItem("Task");
		var_Bar->PutPattern(EXG2ANTTLib::exPatternBox);
		var_Bar->PutColor(RGB(164,164,164));
		var_Bar->PutStartColor(RGB(240,240,240));
		var_Bar->PutEndColor(var_Bar->GetStartColor());
		var_Bar->PutHeight(15);
		var_Bar->PutDef(EXG2ANTTLib::exBarCaption,"label");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("right");
	var_Items->AddBar(h,"Task",COleDateTime(2000,12,22,0,00,00).operator DATE(),COleDateTime(2000,12,27,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarHAlignCaption,long(2));
	h = var_Items->AddItem("right - 4");
	var_Items->AddBar(h,"Task",COleDateTime(2000,12,22,0,00,00).operator DATE(),COleDateTime(2000,12,27,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarHAlignCaption,long(2));
	var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarCaptionHOffset,long(-4));
	h = var_Items->AddItem("left");
	var_Items->AddBar(h,"Task",COleDateTime(2000,12,22,0,00,00).operator DATE(),COleDateTime(2000,12,27,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarHAlignCaption,long(0));
	h = var_Items->AddItem("left + 4");
	var_Items->AddBar(h,"Task",COleDateTime(2000,12,22,0,00,00).operator DATE(),COleDateTime(2000,12,27,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarHAlignCaption,long(0));
	var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarCaptionHOffset,long(4));
spG2antt1->EndUpdate();

2129
Is it possible to always center the bar's caption (even if the item-bar is partially visible)

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetColumns()->Add(L"Align");
spG2antt1->PutHeaderAppearance(EXG2ANTTLib::Flat);
spG2antt1->PutScrollBySingleLine(VARIANT_TRUE);
spG2antt1->PutDrawGridLines(EXG2ANTTLib::exRowLines);
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutDrawGridLines(EXG2ANTTLib::exRowLines);
	var_Chart->PutFirstVisibleDate(COleDateTime(2000,12,23,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,128);
	EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->GetItem("Task");
		var_Bar->PutPattern(EXG2ANTTLib::exPatternBox);
		var_Bar->PutColor(RGB(164,164,164));
		var_Bar->PutStartColor(RGB(240,240,240));
		var_Bar->PutEndColor(var_Bar->GetStartColor());
		var_Bar->PutHeight(15);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("default");
	var_Items->AddBar(h,"Task",COleDateTime(2000,12,22,0,00,00).operator DATE(),COleDateTime(2000,12,27,0,00,00).operator DATE(),"","label");
	var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarHAlignCaption,long(1));
	h = var_Items->AddItem("default + 32");
	var_Items->AddBar(h,"Task",COleDateTime(2000,12,22,0,00,00).operator DATE(),COleDateTime(2000,12,27,0,00,00).operator DATE(),"","label");
	var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarHAlignCaption,long(33));
spG2antt1->EndUpdate();

2128
How do I set an extra data for each item
// MouseMove event - Occurs when the user moves the mouse.
void OnMouseMoveG2antt1(short   Button,short   Shift,long   X,long   Y)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
		#import <ExG2antt.dll>
		using namespace EXG2ANTTLib;
	*/
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	long i = spG2antt1->GetItemFromPoint(-1,-1,c,hit);
	OutputDebugStringW( L"i" );
	OutputDebugStringW( _bstr_t(spG2antt1->GetItems()->GetItemData(i)) );
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutColumnAutoResize(VARIANT_TRUE);
spG2antt1->GetColumns()->Add(L"Default");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->PutItemData(var_Items->AddItem("method 1"),"your extra data of method 1");
	var_Items->InsertItem(0,"your extra data of method 2","method 2");
EXG2ANTTLib::IItemsPtr var_Items1 = spG2antt1->GetItems();
	var_Items1->PutDefaultItem(var_Items1->AddItem("method 3"));
	var_Items1->PutItemData(0,"your extra data of method 3");
spG2antt1->EndUpdate();

2127
Is it possible to show the position of rows the into the chart section

// BeforeExpandItem event - Fired before an item is about to be expanded (collapsed).
void OnBeforeExpandItemG2antt1(long   Item,VARIANT FAR*   Cancel)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
		#import <ExG2antt.dll>
		using namespace EXG2ANTTLib;
	*/
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	spG2antt1->Refresh();
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutIndent(16);
spG2antt1->PutLinesAtRoot(EXG2ANTTLib::exLinesAtRoot);
spG2antt1->PutHasLines(EXG2ANTTLib::exSolidLine);
spG2antt1->PutDrawGridLines(EXG2ANTTLib::exHLines);
spG2antt1->PutScrollBySingleLine(VARIANT_TRUE);
spG2antt1->PutFullRowSelect(EXG2ANTTLib::exColumnSel);
spG2antt1->GetColumns()->Add(L"Tasks");
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Pos")));
	var_Column->PutVisible(VARIANT_FALSE);
	var_Column->PutFormatColumn(L"`<r><bgcolor 000000><fgcolor FFFFFF> ` + 1 apos `` + ` </fgcolor></bgcolor>`");
	var_Column->PutDef(EXG2ANTTLib::exCellValueFormat,long(1));
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutColumnsFormatLevel(L",|,1:64");
	var_Chart->PutFirstVisibleDate(COleDateTime(2006,9,20,0,00,00).operator DATE());
	var_Chart->PutShowCollapsedBars(VARIANT_TRUE);
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,128);
	var_Chart->PutDrawGridLines(EXG2ANTTLib::exHLines);
	EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->GetItem("Task");
		var_Bar->PutOverlaidType(EXG2ANTTLib::exOverlaidBarsStack);
		var_Bar->PutColor(RGB(0,0,0));
		var_Bar->PutStartColor(RGB(196,196,196));
		var_Bar->PutEndColor(RGB(196,196,196));
		var_Bar->PutPattern(EXG2ANTTLib::exPatternBox);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Project 1");
	long h1 = var_Items->InsertItem(h,vtMissing,"Resources");
	var_Items->AddBar(h1,"Task",COleDateTime(2006,9,21,0,00,00).operator DATE(),COleDateTime(2006,9,25,0,00,00).operator DATE(),"A",vtMissing);
	var_Items->AddBar(h1,"Task",COleDateTime(2006,9,24,0,00,00).operator DATE(),COleDateTime(2006,9,28,0,00,00).operator DATE(),"B",vtMissing);
	var_Items->AddBar(h1,"Task",COleDateTime(2006,9,27,0,00,00).operator DATE(),COleDateTime(2006,9,29,0,00,00).operator DATE(),"C",vtMissing);
	h = var_Items->AddItem("Project 2");
	h1 = var_Items->InsertItem(h,vtMissing,"Resources");
	var_Items->AddBar(h1,"Task",COleDateTime(2006,9,21,0,00,00).operator DATE(),COleDateTime(2006,9,25,0,00,00).operator DATE(),"A",vtMissing);
	var_Items->AddBar(h1,"Task",COleDateTime(2006,9,24,0,00,00).operator DATE(),COleDateTime(2006,9,28,0,00,00).operator DATE(),"B",vtMissing);
	var_Items->AddBar(h1,"Task",COleDateTime(2006,9,27,0,00,00).operator DATE(),COleDateTime(2006,9,29,0,00,00).operator DATE(),"C",vtMissing);
	var_Items->PutExpandItem(h,VARIANT_TRUE);
spG2antt1->EndUpdate();

2126
I do not like to specify the item padding for every column I add. The question is how can I do it automatically

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->AttachTemplate("handle AddColumn(Column){Column{Def(48)=8;Def(49)=8;AllowDragging=False;AllowSizing = True}}");
spG2antt1->PutHeaderAppearance(EXG2ANTTLib::Etched);
spG2antt1->PutDrawGridLines(EXG2ANTTLib::exAllLines);
spG2antt1->PutGridLineStyle(EXG2ANTTLib::exGridLinesVSolid);
EXG2ANTTLib::IColumnsPtr var_Columns = spG2antt1->GetColumns();
	var_Columns->Add(L"Item");
	EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Pos")));
		var_Column->PutPosition(0);
		var_Column->PutWidth(32);
		var_Column->PutAllowSizing(VARIANT_FALSE);
		var_Column->PutFormatColumn(L"1 index ``");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddItem("Item A");
	var_Items->AddItem("Item B");
	var_Items->AddItem("Item C");
spG2antt1->EndUpdate();

2125
Stack vs Cascade

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutScrollBySingleLine(VARIANT_TRUE);
spG2antt1->PutHeaderAppearance(EXG2ANTTLib::Flat);
spG2antt1->GetColumns()->Add(L"Type");
spG2antt1->PutBackColorAlternate(RGB(240,240,240));
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutLevelCount(2);
	var_Chart->PutAllowCreateBar(EXG2ANTTLib::exCreateBarAuto);
	var_Chart->PutAllowLinkBars(VARIANT_FALSE);
	var_Chart->PutResizeUnitScale(EXG2ANTTLib::exHour);
	var_Chart->PutPaneWidth(VARIANT_FALSE,128);
	var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
	var_Chart->GetBars()->Copy(L"Task",L"Stack")->PutOverlaidType(EXG2ANTTLib::exOverlaidBarsStack);
	var_Chart->GetBars()->Copy(L"Task",L"AStack")->PutOverlaidType(EXG2ANTTLib::OverlaidBarsTypeEnum(EXG2ANTTLib::exOverlaidBarsStackAutoArrange | EXG2ANTTLib::exOverlaidBarsStack));
	var_Chart->GetBars()->Copy(L"Task",L"Cascade")->PutOverlaidType(EXG2ANTTLib::exOverlaidBarsCascade);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Stack");
	var_Items->AddBar(h,"Stack",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"A1",vtMissing);
	var_Items->AddBar(h,"Stack",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,5,0,00,00).operator DATE(),"A2",vtMissing);
	var_Items->AddBar(h,"Stack",COleDateTime(2001,1,4,0,00,00).operator DATE(),COleDateTime(2001,1,7,0,00,00).operator DATE(),"A3",vtMissing);
	var_Items->AddBar(h,"Stack",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,7,0,00,00).operator DATE(),"A4",vtMissing);
	var_Items->AddBar(h,"Stack",COleDateTime(2001,1,8,0,00,00).operator DATE(),COleDateTime(2001,1,12,0,00,00).operator DATE(),"A5",vtMissing);
	var_Items->AddItem(vtMissing);
	h = var_Items->AddItem("Stack-AutoArrange");
	var_Items->AddBar(h,"AStack",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"A1",vtMissing);
	var_Items->AddBar(h,"AStack",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,5,0,00,00).operator DATE(),"A2",vtMissing);
	var_Items->AddBar(h,"AStack",COleDateTime(2001,1,4,0,00,00).operator DATE(),COleDateTime(2001,1,7,0,00,00).operator DATE(),"A3",vtMissing);
	var_Items->AddBar(h,"AStack",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,7,0,00,00).operator DATE(),"A4",vtMissing);
	var_Items->AddBar(h,"AStack",COleDateTime(2001,1,8,0,00,00).operator DATE(),COleDateTime(2001,1,12,0,00,00).operator DATE(),"A5",vtMissing);
	var_Items->AddItem(vtMissing);
	h = var_Items->AddItem("Cascade");
	var_Items->AddBar(h,"Cascade",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"A1",vtMissing);
	var_Items->AddBar(h,"Cascade",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,5,0,00,00).operator DATE(),"A2",vtMissing);
	var_Items->AddBar(h,"Cascade",COleDateTime(2001,1,4,0,00,00).operator DATE(),COleDateTime(2001,1,7,0,00,00).operator DATE(),"A3",vtMissing);
	var_Items->AddBar(h,"Cascade",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,7,0,00,00).operator DATE(),"A4",vtMissing);
	var_Items->AddBar(h,"Cascade",COleDateTime(2001,1,8,0,00,00).operator DATE(),COleDateTime(2001,1,12,0,00,00).operator DATE(),"A5",vtMissing);
	var_Items->AddItem(vtMissing);
	var_Items->PutItemBar(0,"<*>",EXG2ANTTLib::exBarCaption,"<%=%9%>");
spG2antt1->EndUpdate();

2124
How can I change the Exclude field in the drop down filter window

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutLinesAtRoot(EXG2ANTTLib::exLinesAtRoot);
spG2antt1->PutHTMLPicture(L"exclude",_bstr_t("gCJKBOI4NBQaBQAhQNJJIIhShQACERCAEAcRdrdcUQhQDOZCJJUBEjbbhJ7giIJOBILJziJvl4BeKibhDiIZOhFLB0KZvMx0O5hORlAB3owuNJuNZzMZhOBlFxvORnT") +
"buHgaiIeKBMKhFf9fDIcEoPCAVEAlGI4HhBBYMCARCQVGg4IhVMCAWC2XY1Q7WJ8RBB0KROKYAYDBbzicjndD6fA/VsRHRJIhBkRbMYIGwGAQjA2fRYOEBoYjBFBx1AT" +
"CgCGQ8M7OTjSaJMDRDKIwYu5DrIMBgSAADKJTqhBhyRApAA3FAucZPPilokRJJFJxEVxCMCCgIA==");
spG2antt1->PutDescription(EXG2ANTTLib::exFilterBarExclude,L"<img>exclude</img>");
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Items")));
	var_Column->PutDisplayFilterButton(VARIANT_TRUE);
	var_Column->PutDisplayFilterPattern(VARIANT_FALSE);
	var_Column->PutFilterList(EXG2ANTTLib::FilterListEnum(EXG2ANTTLib::exShowExclude | EXG2ANTTLib::exShowFocusItem | EXG2ANTTLib::exShowCheckBox));
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Root 1");
	var_Items->InsertItem(h,vtMissing,"Child 1");
	var_Items->InsertItem(h,vtMissing,"Child 2");
	var_Items->PutExpandItem(h,VARIANT_TRUE);
	h = var_Items->AddItem("Root 2");
	var_Items->InsertItem(h,vtMissing,"Child 1");
spG2antt1->EndUpdate();

2123
How can I change the Exclude field in the drop down filter window

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutLinesAtRoot(EXG2ANTTLib::exLinesAtRoot);
spG2antt1->PutDescription(EXG2ANTTLib::exFilterBarExclude,L"<bgcolor 0><fgcolor ffffff> Exclude </fgcolor></bgcolor>");
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Items")));
	var_Column->PutDisplayFilterButton(VARIANT_TRUE);
	var_Column->PutDisplayFilterPattern(VARIANT_FALSE);
	var_Column->PutFilterList(EXG2ANTTLib::FilterListEnum(EXG2ANTTLib::exShowExclude | EXG2ANTTLib::exShowFocusItem | EXG2ANTTLib::exShowCheckBox));
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Root 1");
	var_Items->InsertItem(h,vtMissing,"Child 1");
	var_Items->InsertItem(h,vtMissing,"Child 2");
	var_Items->PutExpandItem(h,VARIANT_TRUE);
	h = var_Items->AddItem("Root 2");
	var_Items->InsertItem(h,vtMissing,"Child 1");
spG2antt1->EndUpdate();

2122
The grid lines looks different then before. What should I do

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutLinesAtRoot(EXG2ANTTLib::exLinesAtRoot);
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Tasks")));
	var_Column->PutDef(EXG2ANTTLib::exCellHasCheckBox,VARIANT_TRUE);
	var_Column->PutPartialCheck(VARIANT_TRUE);
spG2antt1->PutDrawGridLines(EXG2ANTTLib::exAllLines);
spG2antt1->PutGridLineStyle(EXG2ANTTLib::exGridLinesGeometric);
spG2antt1->GetChart()->PutDrawGridLines(spG2antt1->GetDrawGridLines());
spG2antt1->GetChart()->PutGridLineStyle(spG2antt1->GetGridLineStyle());
spG2antt1->PutHeaderVisible(EXG2ANTTLib::exHeaderVisibleExtendLevels);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Project");
	long hChild = var_Items->InsertItem(h,vtMissing,"Task 1");
	var_Items->PutSelectItem(hChild,VARIANT_TRUE);
	hChild = var_Items->InsertItem(h,vtMissing,"Task 2");
	var_Items->PutCellState(hChild,long(0),1);
	hChild = var_Items->InsertItem(h,vtMissing,"Task 3");
	var_Items->PutCellState(hChild,long(0),1);
	var_Items->PutExpandItem(h,VARIANT_TRUE);
spG2antt1->EndUpdate();

2121
How can I hide the task/bar's extra-caption

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutPaneWidth(VARIANT_FALSE,96);
	var_Chart->PutFirstVisibleDate(COleDateTime(2011,1,1,0,00,00).operator DATE());
	EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->GetItem("Task");
		var_Bar->PutDef(EXG2ANTTLib::exBarExtraCaption,"<%=%C0%>");
		var_Bar->PutDef(EXG2ANTTLib::exBarHAlignCaption,long(18));
		var_Bar->PutDef(EXG2ANTTLib::exBarExtraCaptionHAlign,long(16));
spG2antt1->GetColumns()->Add(L"Task");
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Show")));
	EXG2ANTTLib::IEditorPtr var_Editor = var_Column->GetEditor();
		var_Editor->PutEditType(EXG2ANTTLib::CheckValueType);
		var_Editor->PutOption(EXG2ANTTLib::exCheckValue2,long(1));
	var_Column->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(57));
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->PutAllowCellValueToItemBar(VARIANT_TRUE);
	var_Items->AddBar(var_Items->AddItem("Task 1"),"Task",COleDateTime(2011,1,3,0,00,00).operator DATE(),COleDateTime(2011,1,7,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutItemBar(var_Items->GetFirstVisibleItem(),"",EXG2ANTTLib::exBarShowExtraCaption,VARIANT_FALSE);
	var_Items->AddBar(var_Items->AddItem("Task 2"),"Task",COleDateTime(2011,1,4,0,00,00).operator DATE(),COleDateTime(2011,1,8,0,00,00).operator DATE(),vtMissing,vtMissing);
spG2antt1->EndUpdate();

2120
How can I hide the task/bar's caption

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutPaneWidth(VARIANT_FALSE,96);
	var_Chart->PutFirstVisibleDate(COleDateTime(2011,1,1,0,00,00).operator DATE());
	EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->GetItem("Task");
		var_Bar->PutDef(EXG2ANTTLib::exBarCaption,"<%=%C0%>");
		var_Bar->PutDef(EXG2ANTTLib::exBarHAlignCaption,long(18));
spG2antt1->GetColumns()->Add(L"Task");
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Show")));
	EXG2ANTTLib::IEditorPtr var_Editor = var_Column->GetEditor();
		var_Editor->PutEditType(EXG2ANTTLib::CheckValueType);
		var_Editor->PutOption(EXG2ANTTLib::exCheckValue2,long(1));
	var_Column->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(56));
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->PutAllowCellValueToItemBar(VARIANT_TRUE);
	var_Items->AddBar(var_Items->AddItem("Task 1"),"Task",COleDateTime(2011,1,3,0,00,00).operator DATE(),COleDateTime(2011,1,7,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutItemBar(var_Items->GetFirstVisibleItem(),"",EXG2ANTTLib::exBarShowCaption,VARIANT_FALSE);
	var_Items->AddBar(var_Items->AddItem("Task 2"),"Task",COleDateTime(2011,1,4,0,00,00).operator DATE(),COleDateTime(2011,1,8,0,00,00).operator DATE(),vtMissing,vtMissing);
spG2antt1->EndUpdate();

2119
Can I sort the column by check-state

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Check")));
	var_Column->PutDef(EXG2ANTTLib::exCellHasCheckBox,VARIANT_TRUE);
	var_Column->PutSortType(EXG2ANTTLib::exSortByState);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddItem(vtMissing);
	var_Items->PutCellState(var_Items->AddItem(vtMissing),long(0),1);
	var_Items->PutCellState(var_Items->AddItem(vtMissing),long(0),1);
	var_Items->AddItem(vtMissing);
spG2antt1->GetColumns()->GetItem(long(0))->PutSortOrder(EXG2ANTTLib::SortAscending);
spG2antt1->EndUpdate();

2118
Can I sort the column by image

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->Images(_bstr_t("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTq") +
"lVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m" +
"0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/y" +
"NAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=");
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Image")));
	var_Column->PutSortType(EXG2ANTTLib::exSortByImage);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->PutCellImage(var_Items->AddItem(vtMissing),long(0),3);
	var_Items->AddItem(vtMissing);
	var_Items->PutCellImage(var_Items->AddItem(vtMissing),long(0),1);
	var_Items->PutCellImage(var_Items->AddItem(vtMissing),long(0),2);
spG2antt1->GetColumns()->GetItem(long(0))->PutSortOrder(EXG2ANTTLib::SortAscending);
spG2antt1->EndUpdate();

2117
Can I sort the column by value(numeric)

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Value")));
	var_Column->PutDef(EXG2ANTTLib::exCellValueFormat,long(1));
	var_Column->PutFormatColumn(L"`<fgcolor=808080><off 4><font ;6> ` + (1 index ``)  + ` </font></off></fgcolor>` + value");
	var_Column->PutSortType(EXG2ANTTLib::SortTypeEnum(EXG2ANTTLib::exSortByValue | EXG2ANTTLib::SortNumeric));
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddItem("1");
	var_Items->AddItem("10");
	var_Items->AddItem("2");
	var_Items->AddItem("20");
spG2antt1->GetColumns()->GetItem(long(0))->PutSortOrder(EXG2ANTTLib::SortAscending);
spG2antt1->EndUpdate();

2116
Can I sort a column by cell's state (checked, unchecked) rather than caption

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Check")));
	EXG2ANTTLib::IEditorPtr var_Editor = var_Column->GetEditor();
		var_Editor->PutEditType(EXG2ANTTLib::CheckValueType);
		var_Editor->PutOption(EXG2ANTTLib::exCheckValue2,long(1));
	var_Column->PutSortType(EXG2ANTTLib::SortNumeric);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddItem(VARIANT_TRUE);
	var_Items->AddItem(VARIANT_FALSE);
	var_Items->AddItem(VARIANT_FALSE);
	var_Items->AddItem(VARIANT_TRUE);
spG2antt1->GetColumns()->GetItem(long(0))->PutSortOrder(EXG2ANTTLib::SortAscending);
spG2antt1->EndUpdate();

2115
How can I highlight(bold) the items that displays milestones (method 2)

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
EXG2ANTTLib::IColumnsPtr var_Columns = spG2antt1->GetColumns();
	var_Columns->Add(L"Tasks");
	((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Start")))->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(1));
	((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"End")))->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(543));
	EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Days")));
		var_Column->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(258));
		var_Column->PutFormatColumn(L"value ? value : ``");
	EXG2ANTTLib::IColumnPtr var_Column1 = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Type")));
		var_Column1->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(0));
		var_Column1->PutVisible(VARIANT_FALSE);
EXG2ANTTLib::IConditionalFormatPtr var_ConditionalFormat = spG2antt1->GetConditionalFormats()->Add(L"%4 = `Milestone`",vtMissing);
	var_ConditionalFormat->PutBold(VARIANT_TRUE);
	var_ConditionalFormat->PutItalic(VARIANT_TRUE);
	var_ConditionalFormat->PutApplyTo(EXG2ANTTLib::exFormatToItems);
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2010,9,20,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,256);
	EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->Add(L"Task:Split");
		var_Bar->PutShortcut(L"Task");
		var_Bar->PutDef(EXG2ANTTLib::exBarKeepWorkingCount,VARIANT_TRUE);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->PutAllowCellValueToItemBar(VARIANT_TRUE);
	var_Items->AddBar(var_Items->AddItem("M1"),"Milestone",COleDateTime(2010,9,24,0,00,00).operator DATE(),COleDateTime(2010,9,24,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("T1"),"Task",COleDateTime(2010,9,24,0,00,00).operator DATE(),COleDateTime(2010,9,28,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("T2"),"Task",COleDateTime(2010,9,27,0,00,00).operator DATE(),COleDateTime(2010,9,28,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("M3"),"Milestone",COleDateTime(2010,9,28,0,00,00).operator DATE(),COleDateTime(2010,9,28,0,00,00).operator DATE(),vtMissing,vtMissing);
spG2antt1->EndUpdate();

2114
How can I highlight(bold) the items that displays milestones (method 1)

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
EXG2ANTTLib::IColumnsPtr var_Columns = spG2antt1->GetColumns();
	var_Columns->Add(L"Tasks");
	((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Start")))->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(1));
	((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"End")))->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(543));
	EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Days")));
		var_Column->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(258));
		var_Column->PutFormatColumn(L"value ? value : ``");
EXG2ANTTLib::IConditionalFormatPtr var_ConditionalFormat = spG2antt1->GetConditionalFormats()->Add(L"%3 = 0",vtMissing);
	var_ConditionalFormat->PutBold(VARIANT_TRUE);
	var_ConditionalFormat->PutItalic(VARIANT_TRUE);
	var_ConditionalFormat->PutApplyTo(EXG2ANTTLib::exFormatToItems);
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2010,9,20,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,256);
	EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->Add(L"Task:Split");
		var_Bar->PutShortcut(L"Task");
		var_Bar->PutDef(EXG2ANTTLib::exBarKeepWorkingCount,VARIANT_TRUE);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->PutAllowCellValueToItemBar(VARIANT_TRUE);
	var_Items->AddBar(var_Items->AddItem("M1"),"Milestone",COleDateTime(2010,9,24,0,00,00).operator DATE(),COleDateTime(2010,9,24,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("T1"),"Task",COleDateTime(2010,9,24,0,00,00).operator DATE(),COleDateTime(2010,9,28,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("T2"),"Task",COleDateTime(2010,9,27,0,00,00).operator DATE(),COleDateTime(2010,9,28,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->AddItem("M3"),"Milestone",COleDateTime(2010,9,28,0,00,00).operator DATE(),COleDateTime(2010,9,28,0,00,00).operator DATE(),vtMissing,vtMissing);
spG2antt1->EndUpdate();

2113
Bars with gradient shows no border or frame arround. What can be done (method 2)

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetColumns()->Add(L"Task");
spG2antt1->GetChart()->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
spG2antt1->GetChart()->PutPaneWidth(VARIANT_FALSE,48);
spG2antt1->PutDefaultItemHeight(24);
EXG2ANTTLib::IBarPtr var_Bar = spG2antt1->GetChart()->GetBars()->Add(L"E1");
	var_Bar->PutColor(RGB(0,0,0));
	var_Bar->PutStartColor(RGB(0,255,0));
	var_Bar->PutEndColor(RGB(255,255,0));
	var_Bar->PutPattern(EXG2ANTTLib::PatternEnum(EXG2ANTTLib::exPatternGradientVBox | EXG2ANTTLib::exPatternBox));
	var_Bar->PutHeight(20);
EXG2ANTTLib::IBarPtr var_Bar1 = spG2antt1->GetChart()->GetBars()->Add(L"E2");
	var_Bar1->PutColor(RGB(0,0,0));
	var_Bar1->PutStartColor(RGB(0,255,0));
	var_Bar1->PutEndColor(RGB(255,255,0));
	var_Bar1->PutPattern(EXG2ANTTLib::PatternEnum(EXG2ANTTLib::exPatternGradientVBox | EXG2ANTTLib::exPatternBox));
	var_Bar1->PutHeight(20);
	var_Bar1->PutDef(EXG2ANTTLib::exBarBackgroundExt,"[frame=RGB(255,0,0),framethick]");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddItem(vtMissing);
	long h = var_Items->AddItem("no border");
	var_Items->AddBar(h,"E1",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,8,0,00,00).operator DATE(),"",vtMissing);
	h = var_Items->AddItem("w/h boder");
	var_Items->AddBar(h,"E2",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,8,0,00,00).operator DATE(),"",vtMissing);
	var_Items->AddItem(vtMissing);
spG2antt1->EndUpdate();

2112
Bars with gradient shows no border or frame arround. What can be done (method 1)

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetColumns()->Add(L"Task");
spG2antt1->GetChart()->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
spG2antt1->GetChart()->PutPaneWidth(VARIANT_FALSE,48);
spG2antt1->PutDefaultItemHeight(24);
EXG2ANTTLib::IBarPtr var_Bar = spG2antt1->GetChart()->GetBars()->Add(L"E2");
	var_Bar->PutColor(RGB(0,0,0));
	var_Bar->PutStartColor(RGB(0,255,0));
	var_Bar->PutEndColor(RGB(255,255,0));
	var_Bar->PutPattern(EXG2ANTTLib::PatternEnum(EXG2ANTTLib::exPatternGradientVBox | EXG2ANTTLib::exPatternBox));
	var_Bar->PutHeight(20);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddItem(vtMissing);
	long h = var_Items->AddItem("no border");
	var_Items->AddBar(h,"E2",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,8,0,00,00).operator DATE(),"",vtMissing);
	h = var_Items->AddItem("w/h boder");
	var_Items->AddBar(h,"E2",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,8,0,00,00).operator DATE(),"",vtMissing);
	var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarBackgroundExt,"[frame=RGB(255,0,0),framethick]");
	var_Items->AddItem(vtMissing);
spG2antt1->EndUpdate();

2111
Is it possible to display auto-numbers (rows-numbers) for non-empty items only

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetChart()->PutPaneWidth(VARIANT_FALSE,128);
EXG2ANTTLib::IColumnsPtr var_Columns = spG2antt1->GetColumns();
	var_Columns->Add(L"Items");
	EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Pos")));
		var_Column->PutFormatColumn(L"len(%C0) ? 1 pos `` : ``");
		var_Column->PutPosition(0);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddItem("Item A");
	var_Items->AddItem("");
	var_Items->AddItem("Item B");
	var_Items->AddItem("");
	var_Items->AddItem("Item C");
spG2antt1->EndUpdate();

2110
Is it possible to separate the group of items using horizontal-lines (root-items)

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetVisualAppearance()->Add(1,_bstr_t("gBFLBCJwBAEHhEJAAEhABLEIQAAYAQGKIcBiAKBQAGaAoDgYN4MAANAwjJBMKgBBCLIxhEYobgmGIaRiAUbQSKEPxLEiPmqSHIEWwtDiBZgieTpNhAMg1CTNU4RAKoY") +
"RzBKeZ7kGZIVjKMofURRDpxBBMAkB");
spG2antt1->PutLinesAtRoot(EXG2ANTTLib::exLinesAtRoot);
spG2antt1->PutDefaultItemHeight(24);
spG2antt1->PutSelBackMode(EXG2ANTTLib::exTransparent);
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,196);
	var_Chart->PutSelBackColor(spG2antt1->GetSelBackColor());
EXG2ANTTLib::IColumnsPtr var_Columns = spG2antt1->GetColumns();
	EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Default")));
		var_Column->PutDef(EXG2ANTTLib::exCellHasCheckBox,VARIANT_TRUE);
		var_Column->PutPartialCheck(VARIANT_TRUE);
	EXG2ANTTLib::IColumnPtr var_Column1 = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Position")));
		var_Column1->PutFormatColumn(L"1 + ((1 rpos ``) contains `.`)");
		var_Column1->PutVisible(VARIANT_FALSE);
EXG2ANTTLib::IConditionalFormatPtr var_ConditionalFormat = spG2antt1->GetConditionalFormats()->Add(L"%C1",vtMissing);
	var_ConditionalFormat->PutBackColor(0x1000000);
	var_ConditionalFormat->PutChartBackColor(var_ConditionalFormat->GetBackColor());
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Group 1");
	var_Items->AddBar(var_Items->InsertItem(h,vtMissing,"Child 1"),"Task",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,13,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->InsertItem(h,vtMissing,"Child 2"),"Task",COleDateTime(2001,1,4,0,00,00).operator DATE(),COleDateTime(2001,1,14,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->PutExpandItem(h,VARIANT_TRUE);
	h = var_Items->AddItem("Group 2");
	var_Items->AddBar(var_Items->InsertItem(h,vtMissing,"Child 1"),"Task",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,13,0,00,00).operator DATE(),vtMissing,vtMissing);
	var_Items->AddBar(var_Items->InsertItem(h,vtMissing,"Child 2"),"Task",COleDateTime(2001,1,4,0,00,00).operator DATE(),COleDateTime(2001,1,14,0,00,00).operator DATE(),vtMissing,vtMissing);
spG2antt1->EndUpdate();

2109
How can specify a black pattern for the task

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutDefaultItemHeight(22);
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,0);
spG2antt1->GetColumns()->Add(L"Frames");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Task");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,12,0,00,00).operator DATE(),"bar A",vtMissing);
	var_Items->PutItemBar(h,"bar A",EXG2ANTTLib::exBarColor,long(1));
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,14,0,00,00).operator DATE(),COleDateTime(2001,1,24,0,00,00).operator DATE(),"bar B",vtMissing);
spG2antt1->EndUpdate();

2108
Can I define a bar so it automatically fills the current item/row height (same height)

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetColumns()->Add(L"Task");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,96);
	var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
	var_Chart->GetBars()->GetItem("Task")->PutHeight(-1);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddBar(var_Items->AddItem("Task A"),"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,5,0,00,00).operator DATE(),vtMissing,vtMissing);
	long h = var_Items->AddItem("Task A");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,5,0,00,00).operator DATE(),"",vtMissing);
	var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarColor,long(255));
spG2antt1->EndUpdate();

2107
How can I highlight a specified date for the entire chart (Method 2)

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetColumns()->Add(L"Tasks");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
	var_Chart->PutPaneWidth(VARIANT_FALSE,96);
	var_Chart->PutUnitWidth(18);
	var_Chart->PutLevelCount(2);
	var_Chart->MarkTimeZone("zone1",COleDateTime(2001,1,8,0,00,00).operator DATE(),COleDateTime(2001,1,9,0,00,00).operator DATE(),long(0),vtMissing);
	var_Chart->MarkTimeZone("zone2",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),long(0),"50");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddItem("");
	long h = var_Items->AddItem("Task(I)");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,5,0,00,00).operator DATE(),COleDateTime(2001,1,12,0,00,00).operator DATE(),"I",vtMissing);
	var_Items->AddItem("");
spG2antt1->EndUpdate();

2106
How can I highlight a specified date for the entire chart, including the header (Method 1)

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetColumns()->Add(L"Tasks");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
	var_Chart->PutPaneWidth(VARIANT_FALSE,96);
	var_Chart->PutUnitWidth(18);
	var_Chart->PutLevelCount(2);
	var_Chart->PutAllowInsideZoom(VARIANT_TRUE);
	var_Chart->PutAllowResizeInsideZoom(VARIANT_FALSE);
	var_Chart->PutInsideZoomOnDblClick(VARIANT_FALSE);
	EXG2ANTTLib::IInsideZoomFormatPtr var_InsideZoomFormat = var_Chart->GetDefaultInsideZoomFormat();
		var_InsideZoomFormat->PutForeColor(RGB(255,255,255));
		var_InsideZoomFormat->PutBackColorChart(RGB(0,0,1));
		var_InsideZoomFormat->PutBackColor(RGB(0,0,1));
	EXG2ANTTLib::IInsideZoomsPtr var_InsideZooms = var_Chart->GetInsideZooms();
		var_InsideZooms->PutSplitBaseLevel(VARIANT_FALSE);
		var_InsideZooms->PutDefaultWidth(18);
		var_InsideZooms->Add(COleDateTime(2001,1,8,0,00,00).operator DATE())->PutAllowInsideFormat(VARIANT_FALSE);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddItem("");
	long h = var_Items->AddItem("Task(I)");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,5,0,00,00).operator DATE(),COleDateTime(2001,1,12,0,00,00).operator DATE(),"I",vtMissing);
	var_Items->AddItem("");
spG2antt1->EndUpdate();

2105
How can I highlight a specified date of a specified item

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetColumns()->Add(L"Tasks");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
	var_Chart->PutPaneWidth(VARIANT_FALSE,96);
	var_Chart->PutUnitWidth(18);
	var_Chart->PutLevelCount(2);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddItem("");
	long h = var_Items->AddItem("Task(D)");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,5,0,00,00).operator DATE(),COleDateTime(2001,1,12,0,00,00).operator DATE(),"D",vtMissing);
	var_Items->AddItem("");
EXG2ANTTLib::INotesPtr var_Notes = spG2antt1->GetChart()->GetNotes();
	EXG2ANTTLib::INotePtr var_Note = var_Notes->Add("NoteD",h,COleDateTime(2001,1,8,0,00,00).operator DATE(),L"<b><%dd%></b><br><%m%><br><%yy%>");
		var_Note->PutPartFixedWidth(EXG2ANTTLib::exNoteEnd,18);
		var_Note->PutPartShadow(EXG2ANTTLib::exNoteEnd,VARIANT_FALSE);
spG2antt1->EndUpdate();

2104
How can I display the start/end of the task within its margins (notes)

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetColumns()->Add(L"Tasks");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
	var_Chart->PutPaneWidth(VARIANT_FALSE,96);
	var_Chart->PutUnitWidth(18);
	var_Chart->PutLevelCount(2);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	var_Items->AddItem("");
	long h = var_Items->AddItem("Task(T)");
	var_Items->AddBar(h,"Task",COleDateTime(2001,1,5,0,00,00).operator DATE(),COleDateTime(2001,1,12,0,00,00).operator DATE(),"T",vtMissing);
	var_Items->AddItem("");
EXG2ANTTLib::INotesPtr var_Notes = spG2antt1->GetChart()->GetNotes();
	EXG2ANTTLib::INotePtr var_Note = var_Notes->Add("NoteTS",h,"T",L"");
		var_Note->PutShowLink(EXG2ANTTLib::exNoteLinkHidden);
		var_Note->PutPartText(EXG2ANTTLib::exNoteStart,L"<%d%>");
		var_Note->PutPartHOffset(EXG2ANTTLib::exNoteStart,9);
		var_Note->PutPartFixedWidth(EXG2ANTTLib::exNoteStart,18);
	EXG2ANTTLib::INotePtr var_Note1 = var_Notes->Add("NoteTE",h,"T",L"");
		var_Note1->PutRelativePosition("E-1");
		var_Note1->PutShowLink(EXG2ANTTLib::exNoteLinkHidden);
		var_Note1->PutPartText(EXG2ANTTLib::exNoteStart,L"<%d%>");
		var_Note1->PutPartHOffset(EXG2ANTTLib::exNoteStart,9);
		var_Note1->PutPartFixedWidth(EXG2ANTTLib::exNoteStart,18);
spG2antt1->EndUpdate();

2103
Is it possible to show the tasks not-overlaid when the item is collapsed and overlaid once the user expands the item

// BeforeExpandItem event - Fired before an item is about to be expanded (collapsed).
void OnBeforeExpandItemG2antt1(long   Item,VARIANT FAR*   Cancel)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
		#import <ExG2antt.dll>
		using namespace EXG2ANTTLib;
	*/
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	spG2antt1->Refresh();
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutIndent(16);
spG2antt1->PutLinesAtRoot(EXG2ANTTLib::exLinesAtRoot);
spG2antt1->PutHasLines(EXG2ANTTLib::exSolidLine);
spG2antt1->PutDrawGridLines(EXG2ANTTLib::exHLines);
spG2antt1->GetColumns()->Add(L"Tasks");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate(COleDateTime(2006,9,20,0,00,00).operator DATE());
	var_Chart->PutShowCollapsedBars(VARIANT_TRUE);
	var_Chart->PutLevelCount(2);
	var_Chart->PutPaneWidth(VARIANT_FALSE,128);
	var_Chart->PutDrawGridLines(EXG2ANTTLib::exHLines);
	EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->GetItem("Task");
		var_Bar->PutOverlaidType(EXG2ANTTLib::exOverlaidBarsStack);
		var_Bar->PutColor(RGB(0,0,0));
		var_Bar->PutStartColor(RGB(196,196,196));
		var_Bar->PutEndColor(RGB(196,196,196));
		var_Bar->PutPattern(EXG2ANTTLib::exPatternBox);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Project 1");
	long h1 = var_Items->InsertItem(h,vtMissing,"Resources");
	var_Items->AddBar(h1,"Task",COleDateTime(2006,9,21,0,00,00).operator DATE(),COleDateTime(2006,9,25,0,00,00).operator DATE(),"A",vtMissing);
	var_Items->AddBar(h1,"Task",COleDateTime(2006,9,24,0,00,00).operator DATE(),COleDateTime(2006,9,28,0,00,00).operator DATE(),"B",vtMissing);
	var_Items->AddBar(h1,"Task",COleDateTime(2006,9,27,0,00,00).operator DATE(),COleDateTime(2006,9,29,0,00,00).operator DATE(),"C",vtMissing);
	h = var_Items->AddItem("Project 2");
	h1 = var_Items->InsertItem(h,vtMissing,"Resources");
	var_Items->AddBar(h1,"Task",COleDateTime(2006,9,21,0,00,00).operator DATE(),COleDateTime(2006,9,25,0,00,00).operator DATE(),"A",vtMissing);
	var_Items->AddBar(h1,"Task",COleDateTime(2006,9,24,0,00,00).operator DATE(),COleDateTime(2006,9,28,0,00,00).operator DATE(),"B",vtMissing);
	var_Items->AddBar(h1,"Task",COleDateTime(2006,9,27,0,00,00).operator DATE(),COleDateTime(2006,9,29,0,00,00).operator DATE(),"C",vtMissing);
	var_Items->PutExpandItem(h,VARIANT_TRUE);
spG2antt1->EndUpdate();

2102
Is it possible to display the label of the level without truncating / no clip

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstWeekDay(EXG2ANTTLib::exSunday);
	var_Chart->PutFirstVisibleDate(COleDateTime(2000,12,31,0,00,00).operator DATE());
	var_Chart->PutPaneWidth(VARIANT_FALSE,0);
	var_Chart->PutLevelCount(3);
	EXG2ANTTLib::ILevelPtr var_Level = var_Chart->GetLevel(0);
		var_Level->PutLabel(long(16));
		var_Level->PutFormatLabel(L"`<c>` + value");
	EXG2ANTTLib::ILevelPtr var_Level1 = var_Chart->GetLevel(1);
		var_Level1->PutLabel(long(256));
		var_Level1->PutFormatLabel(L"`<c>` + value");
	EXG2ANTTLib::ILevelPtr var_Level2 = var_Chart->GetLevel(2);
		var_Level2->PutAlignment(EXG2ANTTLib::AlignmentEnum(0x100));
		var_Level2->PutFormatLabel(L"weekday(dvalue) = 0 ? `<b>` + value : ``");
		var_Level2->PutDrawTickLines(EXG2ANTTLib::exLevelNoLine);
		var_Level2->DrawTickLinesFrom(1,EXG2ANTTLib::exLevelDotLine);
		var_Level2->PutDrawGridLines(VARIANT_TRUE);
	var_Chart->PutUnitWidth(6);
	var_Chart->PutDrawGridLines(EXG2ANTTLib::exAllLines);
spG2antt1->EndUpdate();

2101
How do I get the item's auto-number, when using FormatColumn property, as CellValue gets empty

// SelectionChanged event - Fired after a new item has been selected.
void OnSelectionChangedG2antt1()
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
		#import <ExG2antt.dll>
		using namespace EXG2ANTTLib;
	*/
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
	EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
		OutputDebugStringW( L"pos: " );
		OutputDebugStringW( var_Items->GetCellCaption(var_Items->GetFocusItem(),long(1)) );
		OutputDebugStringW( L"rpos(1): " );
		OutputDebugStringW( var_Items->GetCellCaption(var_Items->GetFocusItem(),long(2)) );
		OutputDebugStringW( L"rpos(2): " );
		OutputDebugStringW( var_Items->GetCellCaption(var_Items->GetFocusItem(),long(3)) );
		OutputDebugStringW( L"apos: " );
		OutputDebugStringW( var_Items->GetCellCaption(var_Items->GetFocusItem(),long(4)) );
		OutputDebugStringW( L"index: " );
		OutputDebugStringW( var_Items->GetCellCaption(var_Items->GetFocusItem(),long(5)) );
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutLinesAtRoot(EXG2ANTTLib::exLinesAtRoot);
spG2antt1->PutDrawGridLines(EXG2ANTTLib::exRowLines);
spG2antt1->PutHeaderAppearance(EXG2ANTTLib::Etched);
EXG2ANTTLib::IColumnsPtr var_Columns = spG2antt1->GetColumns();
	var_Columns->Add(L"Items");
	EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"pos")));
		var_Column->PutFormatColumn(L"1 pos ``");
		var_Column->PutPosition(0);
		var_Column->PutWidth(48);
		var_Column->PutAllowSizing(VARIANT_FALSE);
	EXG2ANTTLib::IColumnPtr var_Column1 = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"rpos(1)")));
		var_Column1->PutFormatColumn(L"1 rpos ``");
		var_Column1->PutPosition(1);
		var_Column1->PutWidth(48);
		var_Column1->PutAllowSizing(VARIANT_FALSE);
	EXG2ANTTLib::IColumnPtr var_Column2 = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"rpos(2)")));
		var_Column2->PutFormatColumn(L"1 rpos `.||A-Z`");
		var_Column2->PutPosition(2);
		var_Column2->PutWidth(48);
		var_Column2->PutAllowSizing(VARIANT_FALSE);
	EXG2ANTTLib::IColumnPtr var_Column3 = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"apos")));
		var_Column3->PutFormatColumn(L"1 apos ``");
		var_Column3->PutPosition(3);
		var_Column3->PutWidth(48);
		var_Column3->PutAllowSizing(VARIANT_FALSE);
	EXG2ANTTLib::IColumnPtr var_Column4 = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"index")));
		var_Column4->PutFormatColumn(L"1 index ``");
		var_Column4->PutPosition(4);
		var_Column4->PutWidth(48);
		var_Column4->PutAllowSizing(VARIANT_FALSE);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
	long h = var_Items->AddItem("Item 1");
	var_Items->InsertItem(h,vtMissing,"Child 1");
	long hSel = var_Items->InsertItem(h,vtMissing,"Child 2");
	var_Items->PutExpandItem(h,VARIANT_TRUE);
	var_Items->AddItem("Item 2");
	var_Items->AddItem("Item 3");
spG2antt1->EndUpdate();
spG2antt1->GetItems()->PutSelectItem(hSel,VARIANT_TRUE);